Skip to content

Commit ed3a8bd

Browse files
committed
JS: Include import paths from custom ModuleImportNode::Range subclasses
1 parent c687dc9 commit ed3a8bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,10 @@ private predicate isDeclaredPackageName(string m) {
21642164

21652165
overlay[local]
21662166
private predicate isImportedPackageName(string m) {
2167-
m = any(Import imprt).getImportedPathString() and
2167+
(
2168+
m = any(Import imprt).getImportedPathString()
2169+
or
2170+
m = any(DataFlow::ModuleImportNode im).getPath()
2171+
) and
21682172
m.regexpMatch("[^./].*")
21692173
}

0 commit comments

Comments
 (0)