fix: inner graph

This commit is contained in:
alexander.akait 2023-05-21 19:08:54 +03:00
parent 214f7cd9fe
commit 4474dc4307
1 changed files with 3 additions and 2 deletions

View File

@ -134,8 +134,9 @@ class InnerGraphPlugin {
const fn = InnerGraph.tagTopLevelSymbol(parser, name);
const decl = statement.declaration;
if (
decl.type === "ClassExpression" ||
decl.type === "ClassDeclaration"
(decl.type === "ClassExpression" ||
decl.type === "ClassDeclaration") &&
parser.isPure(decl, decl.range[0])
) {
classWithTopLevelSymbol.set(decl, fn);
} else if (parser.isPure(decl, statement.range[0])) {