mirror of
https://github.com/less/less.js.git
synced 2026-01-22 13:48:03 -05:00
squeeze extra slashes in url()
This commit is contained in:
@@ -2,10 +2,8 @@
|
||||
|
||||
tree.URL = function (val, paths) {
|
||||
// Add the base path if the URL is relative and we are in the browser
|
||||
if (!/^(?:http:\/)?\//.test(val.value) &&
|
||||
paths.length > 0 &&
|
||||
typeof(window) !== 'undefined') {
|
||||
val.value = [paths[0], val.value].join('/');
|
||||
if (!/^(?:http:\/)?\//.test(val.value) && paths.length > 0 && typeof(window) !== 'undefined') {
|
||||
val.value = [paths[0], val.value].join('/').replace('//', '/');
|
||||
}
|
||||
this.value = val;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user