From e2734b9379520ecf1ad6c66fa4ff3d36197dfdf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAnar=20Vestmann?= Date: Fri, 24 Jan 2025 14:46:44 +0000 Subject: [PATCH] fix(contentful-apps): Translation namespace fallback in case we have an undefined defaultMessage (#17646) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add fallback in case we see an undefined value Co-authored-by: Jón Levy --- .../components/translation-namespace/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/contentful-apps/components/translation-namespace/index.tsx b/apps/contentful-apps/components/translation-namespace/index.tsx index 46d814b7d97d..c0fad6e01139 100644 --- a/apps/contentful-apps/components/translation-namespace/index.tsx +++ b/apps/contentful-apps/components/translation-namespace/index.tsx @@ -129,10 +129,10 @@ export const App = () => { {values[item].markdown ? (
- {values[item].defaultMessage} + {values[item].defaultMessage ?? ''}
) : ( -

{values[item].defaultMessage}

+

{values[item].defaultMessage ?? ''}

)}