Skip to content

Commit 8717f7b

Browse files
committed
restrict precise array elements to Promise.all()
1 parent e2cd7e6 commit 8717f7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

javascript/ql/src/semmle/javascript/Arrays.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ private module ArrayDataFlow {
256256
exists(int i |
257257
element = this.getElement(i) and
258258
obj = this and
259-
prop = arrayElement(i)
259+
if this = any(PromiseAllCreation c).getArrayNode()
260+
then prop = arrayElement(i)
261+
else prop = arrayElement()
260262
)
261263
}
262264
}

0 commit comments

Comments
 (0)