Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit e8874c0

Browse files
committed
applyPaths to return undefined for no match
1 parent b71f22f commit e8874c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/system-resolve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SystemLoader.prototype.normalize = function(name, parentName, parentAddress) {
88

99
// not absolute or relative -> apply paths (what will be sites)
1010
if (!name.match(absURLRegEx) && name[0] != '.')
11-
name = new URL(applyPaths(this.paths, name), baseURI).href;
11+
name = new URL(applyPaths(this.paths, name) || name, baseURI).href;
1212
// apply parent-relative normalization, parentAddress is already normalized
1313
else
1414
name = new URL(name, parentName || baseURI).href;

src/system.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function applyPaths(paths, name) {
4848
}
4949
}
5050

51-
var outPath = paths[pathMatch] || name;
51+
var outPath = paths[pathMatch];
5252
if (typeof wildcard == 'string')
5353
outPath = outPath.replace('*', wildcard);
5454

0 commit comments

Comments
 (0)