mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-23 00:25:15 +01:00
Improved: Version not found (#162)
This commit is contained in:
parent
b42e1dd83c
commit
e9dd0799a0
@ -141,7 +141,11 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
||||
targetPath = resourceMappings[resourceMold].path;
|
||||
targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber);
|
||||
// Replace the requested version with the latest depending on major version
|
||||
versionDelivered = helpers.setLastVersion(targetPath, versionNumber).toString();
|
||||
versionDelivered = helpers.setLastVersion(targetPath, versionNumber);
|
||||
if (versionDelivered === false) {
|
||||
return false;
|
||||
}
|
||||
versionDelivered = versionDelivered.toString();
|
||||
targetPath = targetPath.replace(versionNumber, versionDelivered);
|
||||
|
||||
versionRequested = versionNumber === null ? 'latest' : versionNumber[0];
|
||||
|
@ -640,6 +640,7 @@ helpers.setLastVersion = function (type, version) {
|
||||
} else if (version === null) {
|
||||
return 'latest';
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
helpers.compareVersion = function (v1, v2) {
|
||||
|
Loading…
Reference in New Issue
Block a user