Skip to content
Browse files

fix regression on url.js

  • Loading branch information...
1 parent 97cbfa5 commit 9eb0423cb2428bb166c962f1362ac727f1d92c7d @cloudhead cloudhead committed Nov 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/less/tree/url.js
View
2 lib/less/tree/url.js
@@ -5,7 +5,7 @@ tree.URL = function (val, paths) {
this.attrs = val;
} else {
// Add the base path if the URL is relative and we are in the browser
- if (less.mode === 'browser' && !/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(val.value) && paths.length > 0) {
+ if (typeof(window) !== 'undefined' && !/^(?:https?:\/\/|file:\/\/|data:|\/)/.test(val.value) && paths.length > 0) {
val.value = paths[0] + (val.value.charAt(0) === '/' ? val.value.slice(1) : val.value);
}
this.value = val;

0 comments on commit 9eb0423

Please sign in to comment.
Something went wrong with that request. Please try again.