From b5a28c0ce9911c658eea1e4cf51af197ab1ae736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Wed, 26 Jun 2024 14:05:59 +0200 Subject: [PATCH] Fix block visibility undefined --- client/web/compose/src/mixins/page.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/web/compose/src/mixins/page.js b/client/web/compose/src/mixins/page.js index a8bca803c..86b9a0d6c 100644 --- a/client/web/compose/src/mixins/page.js +++ b/client/web/compose/src/mixins/page.js @@ -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])) {