Skip to content

Commit 7acb83d

Browse files
committed
fix error catching
1 parent 7f69412 commit 7acb83d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/load.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ var Loader = function (data) {
331331
}
332332

333333
process()
334-
.then(function (res, e) {
335-
if (e) {
336-
errorCleanup();
337-
res = null;
338-
}
339-
return callback(e, res);
334+
.then(function (res) {
335+
return callback(null, res);
336+
})
337+
.catch(function (e) {
338+
errorCleanup();
339+
return callback(e);
340340
});
341341
}
342342
}

0 commit comments

Comments
 (0)