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

Increase safety when ejecting blocks

This commit is contained in:
Andrew Kingston 2023-07-17 16:56:48 +01:00
parent 702c2f663a
commit 3a37433427

View file

@ -28,8 +28,11 @@
const eject = () => {
// Start the new structure with the root component
let definition = Object.values(structureLookupMap[$component.id])[0]
.instance
const rootMap = structureLookupMap[$component.id] || {}
let definition = { ...Object.values(rootMap)[0]?.instance }
if (!definition) {
return
}
// Copy styles from block to root component
definition._styles = {