Fix date formatting showing 'undefinedNaN NaN NaN'

This commit is contained in:
Aurora Lahtela 2023-10-21 10:31:23 +03:00
parent 185529678a
commit 65f706d3cc
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ const FormattedDate = ({date}) => {
const {timeZoneOffsetHours} = useMetadata();
const {preferencesLoaded, dateFormatNoSeconds, recentDaysInDateFormat} = usePreferences();
if (!preferencesLoaded) return <></>
if (!preferencesLoaded || date === undefined || date === null) return <></>
const pattern = dateFormatNoSeconds;
const recentDays = recentDaysInDateFormat;