mirror of
https://github.com/less/less.js.git
synced 2026-02-03 19:45:00 -05:00
fix trying to create CSS from null root [browser]
This commit is contained in:
@@ -22,11 +22,10 @@ var readyTimer = setInterval(function () {
|
||||
clearInterval(readyTimer);
|
||||
|
||||
loadStyleSheets(function (root, sheet, env) {
|
||||
createCSS(root.toCSS(), sheet, env.lastModified);
|
||||
|
||||
if (env.local) {
|
||||
log("less: loading " + sheet.href + " from local storage.");
|
||||
} else {
|
||||
createCSS(root.toCSS(), sheet, env.lastModified);
|
||||
log("less: parsed " + sheet.href + " successfully.");
|
||||
}
|
||||
});
|
||||
@@ -40,7 +39,9 @@ if (less.env === 'development') {
|
||||
refreshTimer = setInterval(function () {
|
||||
if (/!refresh/.test(location.hash)) {
|
||||
loadStyleSheets(function (root, sheet, lastModified) {
|
||||
createCSS(root.toCSS(), sheet, lastModified);
|
||||
if (root) {
|
||||
createCSS(root.toCSS(), sheet, lastModified);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
Reference in New Issue
Block a user