fix: ensure […map.keys] can be correctly transformed in loose mode (#11901)

This commit is contained in:
Huáng Jùnliàng
2020-07-31 15:26:22 -04:00
committed by GitHub
parent 08054181c3
commit c41dcd045b
2 changed files with 8 additions and 1 deletions

View File

@@ -518,7 +518,7 @@ class BlockScoping {
// remap loop heads with colliding variables
if (this.loop) {
// nb: clone outsideRefs keys since the map is modified within the loop
for (const name of [...outsideRefs.keys()]) {
for (const name of Array.from(outsideRefs.keys())) {
const id = outsideRefs.get(name);
if (