check for $block.data, to verify that the blockObject is not in a destroyed state.

This commit is contained in:
Niels Lyngsø
2020-06-30 15:59:06 +02:00
parent 26fa38c536
commit e2b7043d3c

View File

@@ -135,7 +135,8 @@
// Append the blockObjects to our layout.
vm.layout.forEach(entry => {
if (entry.$block === undefined || entry.$block === null) {
// $block must have the data property to be a valid BlockObject, if not its concidered as a destroyed blockObject.
if (entry.$block === undefined || entry.$block === null || entry.$block.data === undefined) {
var block = getBlockObject(entry);
// If this entry was not supported by our property-editor it would return 'null'.