Skip to content

Commit 138a16f

Browse files
erik-kroghasgerf
andauthored
use getImportedModuleNode()
Co-authored-by: Asger F <[email protected]>
1 parent 655b4a4 commit 138a16f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/lib/semmle/javascript/PackageExports.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private DataFlow::Node getAValueExportedByPackage() {
8181
// `module.exports.bar = function () { ... };`
8282
exists(DataFlow::PropRead read, Import imp |
8383
read = getAValueExportedByPackage() and
84-
read.getBase().getALocalSource().getEnclosingExpr() = imp and
84+
read.getBase().getALocalSource() = imp.getImportedModuleNode() and
8585
result = imp.getImportedModule().getAnExportedValue(read.getPropertyName())
8686
)
8787
or

0 commit comments

Comments
 (0)