We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a6aa85 commit aee808dCopy full SHA for aee808d
1 file changed
src/utils/walk-nested-map.mts
@@ -6,9 +6,9 @@ export function* walkNestedMap<T>(
6
): Generator<{ keys: string[]; value: T }> {
7
for (const [key, value] of map.entries()) {
8
if (value instanceof Map) {
9
- yield* walkNestedMap(value as NestedMap<T>, keys.concat(key))
+ yield* walkNestedMap(value as NestedMap<T>, [...keys, key])
10
} else {
11
- yield { keys: keys.concat(key), value: value }
+ yield { keys: [...keys, key], value: value }
12
}
13
14
0 commit comments