From 9fa69cf6815b5556e496f24fa01b2a563a4b9d2c Mon Sep 17 00:00:00 2001 From: Pavel Denisjuk Date: Wed, 12 Jun 2024 19:03:20 +0200 Subject: [PATCH] fix(app-headless-cms): use empty object as fallback value --- .../admin/plugins/fieldRenderers/AccordionRenderSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-headless-cms/src/admin/plugins/fieldRenderers/AccordionRenderSettings.tsx b/packages/app-headless-cms/src/admin/plugins/fieldRenderers/AccordionRenderSettings.tsx index 0697f19e236..1abecc384d3 100644 --- a/packages/app-headless-cms/src/admin/plugins/fieldRenderers/AccordionRenderSettings.tsx +++ b/packages/app-headless-cms/src/admin/plugins/fieldRenderers/AccordionRenderSettings.tsx @@ -20,7 +20,7 @@ export const getAccordionRenderSettings = (field: CmsModelField) => { return DEFAULT_ACCORDION_RENDER_SETTINGS; } - return field.renderer.settings as IAccordionRenderSettings; + return (field.renderer.settings ?? {}) as IAccordionRenderSettings; }; export const AccordionRenderSettings = ({ field }: CmsModelFieldRendererSettingsProps) => {