Fix for block instances with no elements

This commit is contained in:
AlexandruPopovici
2023-07-11 13:58:45 +03:00
parent cc055fbc7a
commit 59d327bbb3
@@ -405,17 +405,19 @@ export default class Coverter {
await this.displayableLookup(ref, childNode)
const elements = this.getElementsValue(obj)
for (const element of elements) {
const ref = await this.resolveReference(element)
const childNode: TreeNode = this.tree.parse({
id: this.getNodeId(ref),
raw: Object.assign({}, ref),
atomic: false,
children: []
})
childNode.model.raw.host = obj.id
this.tree.addNode(childNode, node)
await this.displayableLookup(ref, childNode)
if (elements) {
for (const element of elements) {
const ref = await this.resolveReference(element)
const childNode: TreeNode = this.tree.parse({
id: this.getNodeId(ref),
raw: Object.assign({}, ref),
atomic: false,
children: []
})
childNode.model.raw.host = obj.id
this.tree.addNode(childNode, node)
await this.displayableLookup(ref, childNode)
}
}
}
}