Skip to content

Commit de7ec7b

Browse files
committed
refactor top level declarations
- add topLevelDeclarations to code generation results - set topLevelDeclarations=undefined if any child topLevelDeclarations=undefined
1 parent 58a2fd0 commit de7ec7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/library/AssignLibraryPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class AssignLibraryPlugin extends AbstractLibraryPlugin {
243243
if (topLevelDeclarations.has(base))
244244
return topLevelDeclarationContradictionError(base);
245245
const { data } = codeGenerationResults.get(module, chunk.runtime);
246-
topLevelDeclarations = data.get("topLevelDeclarations");
246+
topLevelDeclarations = data && data.get("topLevelDeclarations");
247247
if (topLevelDeclarations && topLevelDeclarations.has(base)) {
248248
return topLevelDeclarationContradictionError(base);
249249
}

0 commit comments

Comments
 (0)