Skip to content

Commit 60f7383

Browse files
committed
change how array is assigned and use const in FlagDependencyExportsPlugin
1 parent 85e0a52 commit 60f7383

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/FlagDependencyExportsPlugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ class FlagDependencyExportsPlugin {
4545
if(exportDeps) {
4646
exportDeps.forEach((dep) => {
4747
const depIdent = dep.identifier();
48-
let array = dependencies[depIdent];
49-
if(!array) array = dependencies[depIdent] = [];
48+
const array = dependencies[depIdent] = dependencies[depIdent] || [];
5049
if(array.indexOf(module) < 0)
5150
array.push(module);
5251
});

0 commit comments

Comments
 (0)