🎨(frontend) replace logical OR with nullish coalescing operator
Replace `||` operators and conditional checks with `??` where appropriate for safer null/undefined handling. Nullish coalescing only triggers for null/undefined values, preventing unexpected behavior with falsy values like 0 or empty strings.
This commit is contained in:
committed by
aleb_the_flash
parent
b265c3c7cb
commit
b058e6add9
@@ -14,7 +14,7 @@ export const ErrorScreen = ({
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<Screen layout="centered">
|
||||
<CenteredContent title={title || t('error.heading')} withBackButton>
|
||||
<CenteredContent title={title ?? t('error.heading')} withBackButton>
|
||||
{!!body && (
|
||||
<Center>
|
||||
<Text as="p" variant="h3" centered>
|
||||
|
||||
Reference in New Issue
Block a user