mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
JS: Improve handling of destructuring export declaration
This commit is contained in:
@@ -318,7 +318,12 @@ private class AnalyzedVariableExport extends AnalyzedPropertyWrite, DataFlow::Va
|
||||
override predicate writes(AbstractValue baseVal, string propName, DataFlow::AnalyzedNode source) {
|
||||
baseVal = TAbstractExportsObject(export.getEnclosingModule()) and
|
||||
propName = name and
|
||||
source = varDef.getSource().analyze()
|
||||
(
|
||||
source = varDef.getSource().analyze()
|
||||
or
|
||||
varDef.getTarget() instanceof DestructuringPattern and
|
||||
source = export.getSourceNode(propName)
|
||||
)
|
||||
}
|
||||
|
||||
override predicate writesValue(AbstractValue baseVal, string propName, AbstractValue val) {
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
| destructuring-export-client.js:3:8:3:41 | // trac ... ort-foo | Failed to track destructuring-export-foo here. |
|
||||
| destructuring-export-client.js:4:8:4:41 | // trac ... ort-bar | Failed to track destructuring-export-bar here. |
|
||||
|
||||
Reference in New Issue
Block a user