From 9d87b385af0fe20813fbfa856f4dfb1259e73ca3 Mon Sep 17 00:00:00 2001 From: danetsao Date: Mon, 6 Nov 2023 14:51:38 -0600 Subject: [PATCH] Changed conditional logic of '??' for null coalescence over '||' --- src/views/CurrentAssignmentView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/CurrentAssignmentView.tsx b/src/views/CurrentAssignmentView.tsx index 0046c2d..26810a6 100644 --- a/src/views/CurrentAssignmentView.tsx +++ b/src/views/CurrentAssignmentView.tsx @@ -34,7 +34,7 @@ export const CurrentAssignmentView: FunctionComponent< const history = useHistory(); const currentRouteId = useRouteMatch<{ servicePointId: string }>( '/settings/calendar/active/:servicePointId' - )?.params?.servicePointId || ''; + )?.params?.servicePointId ?? ''; if (!dataRepository.isLoaded()) { return ( @@ -92,7 +92,7 @@ export const CurrentAssignmentView: FunctionComponent< }; }); - const calendarName = dataRepository.getCalendars().filter((c) => c.assignments.includes(currentRouteId))[0]?.name || ''; + const calendarName = dataRepository.getCalendars().filter((c) => c.assignments.includes(currentRouteId))[0]?.name ?? ''; const pageTitle = intl.formatMessage({ id: 'ui-calendar.meta.titleSettings' }) + ' - ' + intl.formatMessage({ id: 'ui-calendar.currentAssignmentView.title'