use getImportedModuleNode()

Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
Erik Krogh Kristensen
2022-11-09 09:53:23 +01:00
committed by GitHub
parent 655b4a4d17
commit 138a16f0b3

View File

@@ -81,7 +81,7 @@ private DataFlow::Node getAValueExportedByPackage() {
// `module.exports.bar = function () { ... };`
exists(DataFlow::PropRead read, Import imp |
read = getAValueExportedByPackage() and
read.getBase().getALocalSource().getEnclosingExpr() = imp and
read.getBase().getALocalSource() = imp.getImportedModuleNode() and
result = imp.getImportedModule().getAnExportedValue(read.getPropertyName())
)
or