Skip to content

Commit 9e9d9d4

Browse files
committed
JS: Replace ad-hoc ExportDeclaration logic with getDirectSourceNode()
1 parent caee3e5 commit 9e9d9d4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,7 @@ module API {
775775
or
776776
nd = any(DataFlow::CallNode c).getReceiver()
777777
or
778-
nd = DataFlow::valueNode(any(ExportNamedDeclaration decl).getOperand())
779-
or
780-
nd = DataFlow::valueNode(any(ExportDefaultDeclaration decl).getOperand())
781-
or
782-
nd = any(ExportNamedDeclaration decl).getOperand().(DeclStmt).getADecl().getInit().flow()
783-
or
784-
nd = any(ExportNamespaceSpecifier spec | exists(spec.getExportedName())).flow()
778+
nd = any(ExportDeclaration decl).getDirectSourceNode(_)
785779
or
786780
nd = any(MemberDeclaration m).getInit().flow()
787781
} or

0 commit comments

Comments
 (0)