Skip to content

Commit

Permalink
Fixes requirejs/requirejs#911, do not trigger callbacks if errbacks c…
Browse files Browse the repository at this point in the history
…alled in node
  • Loading branch information
jrburke committed Jan 6, 2014
1 parent 729f6ec commit 1235f38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/jslib/node.js
Expand Up @@ -159,7 +159,7 @@
err.originalError = e;
err.moduleName = originalName;
err.requireModules = [moduleName];
return context.onError(err);
throw err;
}
});
}
Expand Down
11 changes: 11 additions & 0 deletions tests/all.js
Expand Up @@ -44,6 +44,17 @@ require({
);
doh.run();

define('testError', function () {
requirejs(['nonExistingModule'], function () {
console.log('BIG TIME FAIL');
}, function (err) {
console.log('OK');
});
});

require(['testError']);


//Print out the test summary.
doh.run();
});

0 comments on commit 1235f38

Please sign in to comment.