File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -823,7 +823,9 @@ abstract class EnhancedForLoop extends LoopStmt {
823823 * expression in this `for`-`in` or `for`-`of` loop.
824824 */
825825 Expr getLValue ( ) {
826- result = getIteratorExpr ( ) or
826+ result = getIterator ( ) and
827+ ( result instanceof BindingPattern or result instanceof PropAccess )
828+ or
827829 result = getIterator ( ) .( DeclStmt ) .getADecl ( ) .getBindingPattern ( )
828830 }
829831
Original file line number Diff line number Diff line change @@ -1118,7 +1118,8 @@ module DataFlow {
11181118 }
11191119
11201120 /**
1121- * Gets the data flow node corresponding the given l-value expression.
1121+ * Gets the data flow node corresponding the given l-value expression, if
1122+ * such a node exists.
11221123 *
11231124 * This differs from `DataFlow::valueNode()`, which represents the value
11241125 * _before_ the l-value is assigned to, whereas `DataFlow::lvalueNode()`
You can’t perform that action at this time.
0 commit comments