Skip to content

Commit 03b0b3a

Browse files
committed
feat: hmrOnInit if data
1 parent d140eac commit 03b0b3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Angular2HMRLoader(source, sourcemap) {
4848
' module["hot"]["accept"]();'+ newLine +
4949
' '+ newLine +
5050
' if (MODULE_REF.instance["hmrOnInit"]) {'+ newLine +
51-
' MODULE_REF.instance["hmrOnInit"](module["hot"]["data"]);'+ newLine +
51+
' module["hot"]["data"] && MODULE_REF.instance["hmrOnInit"](module["hot"]["data"]);'+ newLine +
5252
' }'+ newLine +
5353
' if (MODULE_REF.instance["hmrOnStatus"]) {'+ newLine +
5454
' module["hot"]["apply"](function(status) {'+ newLine +

0 commit comments

Comments
 (0)