Skip to content

Commit 9b4c5d5

Browse files
committed
fixed onError
1 parent e20b2ac commit 9b4c5d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node/NodeMainTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ NodeMainTemplate.prototype.renderRequireEnsure = function(hash, chunk) {
5454
.replace(Template.REGEXP_ID, "\" + chunkId + \"") + ";",
5555
"require('fs').readFile(filename, 'utf-8', function(err, content) {",
5656
this.indent([
57-
"if(err) { if(" + this.requireFn + ".onerror) return " + this.requireFn + ".onerror(err); else throw err; }",
57+
"if(err) { if(" + this.requireFn + ".onError) return " + this.requireFn + ".onError(err); else throw err; }",
5858
"var chunk = {};",
5959
"require('vm').runInThisContext('(function(exports) {' + content + '\\n})', filename)(chunk);",
6060
].concat(insertMoreModules).concat([

0 commit comments

Comments
 (0)