From 3081ac4a0c2a79a5bd7810aecd0f35c2691e04cc Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Mon, 28 Oct 2024 18:27:45 +0100 Subject: [PATCH] Fix edge case where data is empty --- packages/volto-light-theme/src/config/blocks.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/volto-light-theme/src/config/blocks.tsx b/packages/volto-light-theme/src/config/blocks.tsx index f5a49185..16b4c1d5 100644 --- a/packages/volto-light-theme/src/config/blocks.tsx +++ b/packages/volto-light-theme/src/config/blocks.tsx @@ -128,6 +128,7 @@ export default function install(config: ConfigType) { ]; function blockThemesEnhancer(data) { + if (!data['@type']) return {}; const blockConfig = config.blocks.blocksConfig[data['@type']]; const blockStyleDefinitions = // We look up for the blockThemes in the block's config, then in the global config