From 1357a18b65f6c6d9eb5df45fb9c48645413f97e4 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 22 Feb 2025 16:49:50 +0100 Subject: [PATCH] Don't crash when text field is not set (#147) --- src/Components/Profile/Subcomponents/ProfileTextView.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Components/Profile/Subcomponents/ProfileTextView.tsx b/src/Components/Profile/Subcomponents/ProfileTextView.tsx index 9fc35bbb..f2f1d283 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextView.tsx @@ -17,9 +17,7 @@ export const ProfileTextView = ({ }) => { const text = get(item, dataField) - if (typeof text !== 'string') { - throw new Error('ProfileTextView: text is not a string') - } + const parsedText = typeof text !== 'string' ? '' : text return (
@@ -27,7 +25,7 @@ export const ProfileTextView = ({

{heading}

)}
- +
)