diff --git a/lib/less/browser.js b/lib/less/browser.js index b7de8be8..f5cf6a55 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -17,7 +17,8 @@ less.env = less.env || (location.hostname == '127.0.0.1' || // doesn't start loading before the stylesheets are parsed. // Setting this to `true` can result in flickering. // -less.async = false; +less.async = less.async || false; +less.fileAsync = less.fileAsync || false; // Interval between watch polls less.poll = less.poll || (isFileProtocol ? 1000 : 1500); @@ -229,7 +230,7 @@ function createCSS(styles, sheet, lastModified) { function xhr(url, type, callback, errback) { var xhr = getXMLHttpRequest(); - var async = isFileProtocol ? false : less.async; + var async = isFileProtocol ? less.fileAsync : less.async; if (typeof(xhr.overrideMimeType) === 'function') { xhr.overrideMimeType('text/css');