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 = resourceMappings[resourceMold].path;
|
||||||
targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber);
|
targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber);
|
||||||
// Replace the requested version with the latest depending on major version
|
// 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);
|
targetPath = targetPath.replace(versionNumber, versionDelivered);
|
||||||
|
|
||||||
versionRequested = versionNumber === null ? 'latest' : versionNumber[0];
|
versionRequested = versionNumber === null ? 'latest' : versionNumber[0];
|
||||||
|
|
|
@ -640,6 +640,7 @@ helpers.setLastVersion = function (type, version) {
|
||||||
} else if (version === null) {
|
} else if (version === null) {
|
||||||
return 'latest';
|
return 'latest';
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
helpers.compareVersion = function (v1, v2) {
|
helpers.compareVersion = function (v1, v2) {
|
||||||
|
|
Loading…
Reference in New Issue