mirror of
https://github.com/systemjs/systemjs.git
synced 2026-02-01 15:59:54 +00:00
location map fix
This commit is contained in:
parent
90f13f9d8a
commit
7510c8ed93
10
loader.js
10
loader.js
@ -81,11 +81,7 @@
|
||||
var location = getLocation(name);
|
||||
var parentLocation = getLocation(parentName);
|
||||
|
||||
// if it has a location, and it matches the parent location, remove it before applying map config
|
||||
if (location && location == getLocation(parentName))
|
||||
name = name.substr(location.length + 1);
|
||||
|
||||
// if there is a parent location, and it doesnt match the location, add it
|
||||
// if there is a parent location, and there is no location, add it here
|
||||
if (parentLocation && !location)
|
||||
name = parentLocation + ':' + name;
|
||||
|
||||
@ -142,10 +138,6 @@
|
||||
if (mapPrefixMatch)
|
||||
name = mapMatch + name.substr(mapPrefixMatch.length);
|
||||
|
||||
// now add location to name
|
||||
if (!getLocation(name) && !name.match(absUrlRegEx) && parentLocation)
|
||||
name = parentLocation + ':' + name;
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user