Skip to content

Commit 8f896f0

Browse files
only flatten at the last step
1 parent 3c5aabb commit 8f896f0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/util.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export function getValuesForKey (key, item) {
2929
}
3030
})
3131

32-
// Support arrays and Immutable lists.
33-
tmp = tmp.map(r => (r && r.push && r.toArray) ? r.toArray() : r)
34-
tmp = flatten(tmp)
35-
3632
results = tmp
3733
})
34+
35+
// Support arrays and Immutable lists.
36+
results = results.map(r => (r && r.push && r.toArray) ? r.toArray() : r)
37+
results = flatten(results)
3838

3939
return results.filter(r => typeof r === 'string' || typeof r === 'number')
4040
}

0 commit comments

Comments
 (0)