1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Remove pointless map

This commit is contained in:
Andrew Kingston 2023-07-17 16:59:40 +01:00
parent 4425c59929
commit 92e4422e89

View file

@ -53,12 +53,7 @@
const attachChildren = (rootComponent, map) => {
// Transform map into children array
let id = rootComponent._id
const children = Object.values(map[id] || {}).map(
({ order, instance }) => ({
order,
instance,
})
)
const children = Object.values(map[id] || {})
if (!children.length) {
return
}