From 65f706d3ccd45dfd099b33606b2f36adf34ce374 Mon Sep 17 00:00:00 2001 From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> Date: Sat, 21 Oct 2023 10:31:23 +0300 Subject: [PATCH] Fix date formatting showing 'undefinedNaN NaN NaN' --- Plan/react/dashboard/src/components/text/FormattedDate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan/react/dashboard/src/components/text/FormattedDate.js b/Plan/react/dashboard/src/components/text/FormattedDate.js index 761e937d1..af5be08a0 100644 --- a/Plan/react/dashboard/src/components/text/FormattedDate.js +++ b/Plan/react/dashboard/src/components/text/FormattedDate.js @@ -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;