Skip to content

Commit

Permalink
Merge pull request webpack#7210 from gluecodes/master
Browse files Browse the repository at this point in the history
fix: ReferenceError: onScriptComplete is not defined when using HMR o…
  • Loading branch information
sokra authored May 28, 2018
2 parents ae6c7a4 + 9791c0b commit 3f183b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/web/JsonpMainTemplatePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class JsonpMainTemplatePlugin {
"onScriptComplete({ type: 'timeout', target: script });"
]),
`}, ${chunkLoadTimeout});`,
"script.onerror = script.onload = onScriptComplete;",
"function onScriptComplete(event) {",
Template.indent([
"// avoid mem leaks in IE.",
Expand All @@ -196,7 +195,8 @@ class JsonpMainTemplatePlugin {
]),
"}"
]),
"};"
"};",
"script.onerror = script.onload = onScriptComplete;"
]);
}
);
Expand Down

0 comments on commit 3f183b5

Please sign in to comment.