Remove pointless map

This commit is contained in:
Andrew Kingston 2023-07-17 16:59:40 +01:00
parent 4425c59929
commit 92e4422e89
1 changed files with 1 additions and 6 deletions

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
}