Increase safety when ejecting blocks
This commit is contained in:
parent
702c2f663a
commit
3a37433427
|
@ -28,8 +28,11 @@
|
||||||
|
|
||||||
const eject = () => {
|
const eject = () => {
|
||||||
// Start the new structure with the root component
|
// Start the new structure with the root component
|
||||||
let definition = Object.values(structureLookupMap[$component.id])[0]
|
const rootMap = structureLookupMap[$component.id] || {}
|
||||||
.instance
|
let definition = { ...Object.values(rootMap)[0]?.instance }
|
||||||
|
if (!definition) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Copy styles from block to root component
|
// Copy styles from block to root component
|
||||||
definition._styles = {
|
definition._styles = {
|
||||||
|
|
Loading…
Reference in New Issue