Skip to content

Commit

Permalink
refactor top level declarations
Browse files Browse the repository at this point in the history
- add topLevelDeclarations to code generation results
- set topLevelDeclarations=undefined if any child topLevelDeclarations=undefined
  • Loading branch information
vankop committed Feb 7, 2022
1 parent 58a2fd0 commit de7ec7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/library/AssignLibraryPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin {
if (topLevelDeclarations.has(base))
return topLevelDeclarationContradictionError(base);
const { data } = codeGenerationResults.get(module, chunk.runtime);
topLevelDeclarations = data.get("topLevelDeclarations");
topLevelDeclarations = data && data.get("topLevelDeclarations");
if (topLevelDeclarations && topLevelDeclarations.has(base)) {
return topLevelDeclarationContradictionError(base);
}
Expand Down

0 comments on commit de7ec7b

Please sign in to comment.