Skip to content

Commit bbb9f38

Browse files
committed
fix: ReferenceError: onScriptComplete is not defined when using HMR on Firefox 45
1 parent ce184a5 commit bbb9f38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/web/JsonpMainTemplatePlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ class JsonpMainTemplatePlugin {
173173
"onScriptComplete({ type: 'timeout', target: script });"
174174
]),
175175
`}, ${chunkLoadTimeout});`,
176-
"script.onerror = script.onload = onScriptComplete;",
177176
"function onScriptComplete(event) {",
178177
Template.indent([
179178
"// avoid mem leaks in IE.",
@@ -196,7 +195,8 @@ class JsonpMainTemplatePlugin {
196195
]),
197196
"}"
198197
]),
199-
"};"
198+
"};",
199+
"script.onerror = script.onload = onScriptComplete;"
200200
]);
201201
}
202202
);

0 commit comments

Comments
 (0)