fix appending to a froozen object (#19003)

This commit is contained in:
Niels Lyngsø
2025-04-11 10:33:21 +02:00
committed by GitHub
parent 63f2fabb5f
commit 3210c304fe

View File

@@ -53,7 +53,11 @@ export abstract class UmbPropertyEditorUiRteElementBase
const buildUpValue: Partial<UmbPropertyEditorRteValueType> = 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 ??= [];