Skip to content

Commit caee3e5

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

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
@@ -2159,6 +2159,10 @@ private predicate isDeclaredPackageName(string m) {
21592159

21602160
overlay[local]
21612161
private predicate isImportedPackageName(string m) {
2162-
m = any(Import imprt).getImportedPathString() and
2162+
(
2163+
m = any(Import imprt).getImportedPathString()
2164+
or
2165+
m = any(DataFlow::ModuleImportNode im).getPath()
2166+
) and
21632167
m.regexpMatch("[^./].*")
21642168
}

0 commit comments

Comments
 (0)