3
0

Fix block visibility undefined

This commit is contained in:
Jože Fortun 2024-06-26 14:05:59 +02:00
parent ab2129b7e5
commit 487d2ba81b

View File

@ -159,8 +159,10 @@ export default {
blocksExpressions = await this.evaluateBlocksExpressions(variables)
}
blocks.forEach(({ blockID, xywh, meta }) => {
blocks.forEach(({ blockID, xywh }) => {
const block = this.page.blocks.find(b => b.blockID === blockID)
const { meta = {} } = block || {}
const { roles = [], expression = '' } = meta.visibility || {}
if (block && (!expression || blocksExpressions[blockID])) {