mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Update javascript/ql/lib/semmle/javascript/internal/NameResolution.qll
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
@@ -312,12 +312,12 @@ module NameResolution {
|
||||
*/
|
||||
private predicate storeToVariable(Expr value, string prop, LocalVariableLike target) {
|
||||
exists(AssignExpr assign |
|
||||
// exports.name = value
|
||||
// target.name = value
|
||||
assign.getLhs().(PropAccess).accesses(target.getAnAccess(), prop) and
|
||||
value = assign.getRhs()
|
||||
)
|
||||
or
|
||||
// exports = { name: value }
|
||||
// target = { name: value }
|
||||
value = target.getAnAssignedExpr().(ObjectExpr).getPropertyByName(prop).getInit()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user