Skip to content

Commit 0d4c162

Browse files
committed
Removed tuple destruction from map
1 parent fda1683 commit 0d4c162

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lualib/Map.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ class Map<TKey, TValue> {
99

1010
if (other instanceof Map) {
1111
this.size = other.size;
12-
for (const [key, value] of other.entries()) {
13-
this.items[key as any] = value;
12+
for (const kvp of other.entries()) {
13+
this.items[kvp[0] as any] = kvp[1];
1414
}
1515
} else if (other !== undefined) {
1616
this.size = other.length;
17-
for (const [key, value] of other) {
18-
this.items[key as any] = value;
17+
for (const kvp of other) {
18+
this.items[kvp[0] as any] = kvp[1];
1919
}
2020
}
2121
}

0 commit comments

Comments
 (0)