fix imports on browser

This commit is contained in:
Alexis Sellier
2012-01-15 16:44:03 +01:00
parent 9c344ba5a1
commit b5dd30f4d4

View File

@@ -39,7 +39,7 @@ if (less.env === 'development') {
}
less.watchTimer = setInterval(function () {
if (less.watchMode) {
loadStyleSheets(function (root, sheet, env) {
loadStyleSheets(function (e, root, sheet, env) {
if (root) {
createCSS(root.toCSS(), sheet, env.lastModified);
}
@@ -78,7 +78,7 @@ less.refresh = function (reload) {
var startTime, endTime;
startTime = endTime = new(Date);
loadStyleSheets(function (root, sheet, env) {
loadStyleSheets(function (e, root, sheet, env) {
if (env.local) {
log("loading " + sheet.href + " from cache.");
} else {
@@ -153,7 +153,7 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
}).parse(data, function (e, root) {
if (e) { return error(e, href) }
try {
callback(root, sheet, { local: false, lastModified: lastModified, remaining: remaining });
callback(e, root, sheet, { local: false, lastModified: lastModified, remaining: remaining });
removeNode(document.getElementById('less-error-message:' + extractId(href)));
} catch (e) {
error(e, href);