From 3210c304fe32bc842c4bd23b76a7360f86ea2664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 11 Apr 2025 10:33:21 +0200 Subject: [PATCH] fix appending to a froozen object (#19003) --- .../src/packages/rte/components/rte-base.element.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts b/src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts index fcf6be124e..801b55bbd9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts @@ -53,7 +53,11 @@ export abstract class UmbPropertyEditorUiRteElementBase const buildUpValue: Partial = value ? { ...value } : {}; buildUpValue.markup ??= ''; - buildUpValue.blocks ??= { layout: {}, contentData: [], settingsData: [], expose: [] }; + if (buildUpValue.blocks) { + buildUpValue.blocks = { ...buildUpValue.blocks }; + } else { + buildUpValue.blocks ??= { layout: {}, contentData: [], settingsData: [], expose: [] }; + } buildUpValue.blocks.layout ??= {}; buildUpValue.blocks.contentData ??= []; buildUpValue.blocks.settingsData ??= [];