From 402b22b5d7cd5b83efc3a4b6e47e411a0d376541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Sun, 8 Dec 2024 17:24:23 +0100 Subject: [PATCH] Fix initialBlocks config, do not override the whole thing. (#441) --- packages/volto-light-theme/news/441.bugfix | 1 + packages/volto-light-theme/src/config/blocks.tsx | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 packages/volto-light-theme/news/441.bugfix diff --git a/packages/volto-light-theme/news/441.bugfix b/packages/volto-light-theme/news/441.bugfix new file mode 100644 index 00000000..90b921a4 --- /dev/null +++ b/packages/volto-light-theme/news/441.bugfix @@ -0,0 +1 @@ +Fix initialBlocks config, do not override the whole thing. @sneridagh diff --git a/packages/volto-light-theme/src/config/blocks.tsx b/packages/volto-light-theme/src/config/blocks.tsx index 2e3fce11..e5ef35a4 100644 --- a/packages/volto-light-theme/src/config/blocks.tsx +++ b/packages/volto-light-theme/src/config/blocks.tsx @@ -63,13 +63,11 @@ declare module '@plone/types' { export default function install(config: ConfigType) { // Initial block for event content type - config.blocks.initialBlocks = { - Event: [ - { '@type': 'title' }, - { '@type': 'eventMetadata', fixed: true, required: true }, - { '@type': 'slate' }, - ], - }; + config.blocks.initialBlocks.Event = [ + { '@type': 'title' }, + { '@type': 'eventMetadata', fixed: true, required: true }, + { '@type': 'slate' }, + ]; // Palettes config.blocks.themes = [