mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Once applying the rootpath, null it so it will not be applied again
This commit is contained in:
@@ -12,7 +12,7 @@ tree.URL.prototype = {
|
||||
var val = this.value.eval(ctx), rootpath;
|
||||
|
||||
// Add the base path if the URL is relative
|
||||
if (typeof val.value === "string" && !/^(?:[a-z-]+:|\/)/.test(val.value)) {
|
||||
if (this.rootpath && typeof val.value === "string" && !/^(?:[a-z-]+:|\/)/.test(val.value)) {
|
||||
rootpath = this.rootpath;
|
||||
if (!val.quote) {
|
||||
rootpath = rootpath.replace(/[\(\)'"\s]/g, function(match) { return "\\"+match; });
|
||||
@@ -20,7 +20,7 @@ tree.URL.prototype = {
|
||||
val.value = rootpath + val.value;
|
||||
}
|
||||
|
||||
return new(tree.URL)(val, this.rootpath);
|
||||
return new(tree.URL)(val, null);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user