Skip to content

Commit aee808d

Browse files
committed
Minor tweaks to walkNestedMap
1 parent 5a6aa85 commit aee808d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/walk-nested-map.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export function* walkNestedMap<T>(
66
): Generator<{ keys: string[]; value: T }> {
77
for (const [key, value] of map.entries()) {
88
if (value instanceof Map) {
9-
yield* walkNestedMap(value as NestedMap<T>, keys.concat(key))
9+
yield* walkNestedMap(value as NestedMap<T>, [...keys, key])
1010
} else {
11-
yield { keys: keys.concat(key), value: value }
11+
yield { keys: [...keys, key], value: value }
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)