location map fix

This commit is contained in:
guybedford 2013-07-11 20:50:17 -07:00
parent 90f13f9d8a
commit 7510c8ed93

View File

@ -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;
}