Skip to content

Commit 52d7c41

Browse files
committed
fixes webpack#3159
1 parent a58ce33 commit 52d7c41

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎lib/HotModuleReplacement.runtime.js‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,13 @@ module.exports = function() {
472472
for(moduleId in outdatedDependencies) {
473473
if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
474474
module = installedModules[moduleId];
475-
moduleOutdatedDependencies = outdatedDependencies[moduleId];
476-
for(j = 0; j < moduleOutdatedDependencies.length; j++) {
477-
dependency = moduleOutdatedDependencies[j];
478-
idx = module.children.indexOf(dependency);
479-
if(idx >= 0) module.children.splice(idx, 1);
475+
if(module) {
476+
moduleOutdatedDependencies = outdatedDependencies[moduleId];
477+
for(j = 0; j < moduleOutdatedDependencies.length; j++) {
478+
dependency = moduleOutdatedDependencies[j];
479+
idx = module.children.indexOf(dependency);
480+
if(idx >= 0) module.children.splice(idx, 1);
481+
}
480482
}
481483
}
482484
}

0 commit comments

Comments
 (0)