Skip to content

Commit ee72bce

Browse files
author
John
committed
IE8 for-in, skip prototype property.
1 parent f66f024 commit ee72bce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/JsonpMainTemplatePlugin.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ JsonpMainTemplatePlugin.prototype.apply = function(mainTemplate) {
105105
]),
106106
"}",
107107
"for(moduleId in moreModules) {",
108-
this.indent(this.renderAddModule(hash, chunk, "moduleId", "moreModules[moduleId]")),
108+
this.indent([
109+
"if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {",
110+
this.indent(this.renderAddModule(hash, chunk, "moduleId", "moreModules[moduleId]")),
111+
"}"
112+
]),
109113
"}",
110114
"if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);",
111115
"while(callbacks.length)",

0 commit comments

Comments
 (0)