Skip to content

Commit 9df9232

Browse files
authored
reverted minor performance regression
1 parent 4d186ee commit 9df9232

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/FlagDependencyExportsPlugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ class FlagDependencyExportsPlugin {
4747
const depIdent = dep.identifier();
4848
// if this was not yet initialized
4949
// initialize it as an array containing the module and stop
50-
if(!dependencies[depIdent]) {
50+
const array = dependencies[depIdent];
51+
if(!array) {
5152
dependencies[depIdent] = [module];
5253
return;
5354
}
5455

5556
// check if this module is known
5657
// if not, add it to the dependencies for this identifier
57-
if(dependencies[depIdent].indexOf(module) < 0)
58-
dependencies[depIdent].push(module);
58+
if(array.indexOf(module) < 0)
59+
array.push(module);
5960
});
6061
}
6162
let changed = false;

0 commit comments

Comments
 (0)