We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getImportedModuleNode()
1 parent 655b4a4 commit 138a16fCopy full SHA for 138a16f
javascript/ql/lib/semmle/javascript/PackageExports.qll
@@ -81,7 +81,7 @@ private DataFlow::Node getAValueExportedByPackage() {
81
// `module.exports.bar = function () { ... };`
82
exists(DataFlow::PropRead read, Import imp |
83
read = getAValueExportedByPackage() and
84
- read.getBase().getALocalSource().getEnclosingExpr() = imp and
+ read.getBase().getALocalSource() = imp.getImportedModuleNode() and
85
result = imp.getImportedModule().getAnExportedValue(read.getPropertyName())
86
)
87
or
0 commit comments