8000 (ws) · rusongyu/less.js@0f1527c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f1527c

Browse files
committed
(ws)
1 parent 8e18640 commit 0f1527c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/less/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ less.Parser.importer = function (file, paths, callback, env) {
106106

107107
if (pathname) {
108108
fs.readFile(pathname, 'utf-8', function(e, data) {
109-
if (e) sys.error(e);
110-
111-
new(less.Parser)({
112-
paths: [path.dirname(pathname)].concat(paths),
113-
filename: pathname
114-
}).parse(data, function (e, root) {
115-
callback(e, root, data);
116-
});
109+
if (e) return callback(e);
110+
111+
new(less.Parser)({
112+
paths: [path.dirname(pathname)].concat(paths),
113+
filename: pathname
114+
}).parse(data, function (e, root) {
115+
callback(e, root, data);
116+
});
117117
});
118118
} else {
119119
if (typeof(env.errback) === "function") {

0 commit comments

Comments
 (0)
0