Compare commits

...

2 Commits

Author SHA1 Message Date
Anton Tranelis
32aa96e9a0
Merge branch 'main' into fix-build-lag 2025-02-22 15:50:57 +00:00
Max
1357a18b65
Don't crash when text field is not set (#147) 2025-02-22 15:49:50 +00:00

View File

@ -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 (
<div className='tw-my-10 tw-mt-2 tw-px-6'>
@ -27,7 +25,7 @@ export const ProfileTextView = ({
<h2 className='tw-text-lg tw-font-semibold'>{heading}</h2>
)}
<div className='tw-mt-2 tw-text-sm'>
<TextView itemId={item.id} rawText={text} />
<TextView itemId={item.id} rawText={parsedText} />
</div>
</div>
)