1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-02-18 12:50:49 +01:00

Just formatting

This commit is contained in:
nobody 2021-04-29 06:29:12 +02:00
parent 25200ef33c
commit 4bb9c058d3
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
4 changed files with 18 additions and 19 deletions

View File

@ -130,14 +130,13 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
versionNumber = resourcePath.match(Resource.VERSION_EXPRESSION); versionNumber = resourcePath.match(Resource.VERSION_EXPRESSION);
// Handle weird version expressions // Handle weird version expressions
if(!versionNumber){ if (!versionNumber) {
if (Resource.SINGLE_NUMBER_EXPRESSION.test(channelPath)) { if (Resource.SINGLE_NUMBER_EXPRESSION.test(channelPath)) {
versionNumber = channelPath.match(/\d/); versionNumber = channelPath.match(/\d/);
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER); resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
versionNumber = [`${versionNumber}.0`]; versionNumber = [`${versionNumber}.0`];
} }
} } else {
else {
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER); resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
} }

View File

@ -206,8 +206,8 @@ targets.setLastVersion = function (type, version) {
} else if (type.startsWith('/bootstrap-3-typeahead/4.')) { } else if (type.startsWith('/bootstrap-3-typeahead/4.')) {
return '4.0.2'; return '4.0.2';
} else if (type.startsWith('/bowser/')) { } else if (type.startsWith('/bowser/')) {
if (version != 'latest' && helpers.compareVersion('1.9.4', version)) return '1.9.4'; if (version !== 'latest' && helpers.compareVersion('1.9.4', version)) return '1.9.4';
return '2.11.0' return '2.11.0';
} else if (type.startsWith('/bulma/0.')) { } else if (type.startsWith('/bulma/0.')) {
return '0.9.2'; return '0.9.2';
} else if (type.startsWith('/Chart.js/2.')) { } else if (type.startsWith('/Chart.js/2.')) {