The code suggests that there should always be an array of entities in a Block. However, when parsing certain files, this array is missing from some Blocks, causing an error.
I assume that it is enough to change this check:
if (!block) {
logger.error('no block found for insert. block:', insert.block)
return
}
on
if (!block || !block.entities) {
logger.error('no block found for insert. block:', insert.block)
return
}
The code suggests that there should always be an array of entities in a Block. However, when parsing certain files, this array is missing from some Blocks, causing an error.
I assume that it is enough to change this check:
on