Unverified Commit d4dfba48 authored by Thomas Citharel's avatar Thomas Citharel
Browse files

Fix error page when ends_on date is null



Closes #936

Signed-off-by: default avatarThomas Citharel <tcit@tcit.fr>
parent a54b879c
......@@ -56,7 +56,7 @@ const SHORT_TIME_FORMAT_OPTIONS: DateTimeFormatOptions = {
function formatDateTimeString(
value: string,
timeZone: string | undefined = undefined,
timeZone: string | null | undefined = undefined,
showTime = true,
dateFormat = "long"
): string {
......@@ -68,7 +68,7 @@ function formatDateTimeString(
options = {
...options,
...(isLongFormat ? LONG_TIME_FORMAT_OPTIONS : SHORT_TIME_FORMAT_OPTIONS),
timeZone,
timeZone: timeZone || undefined,
};
}
const format = new Intl.DateTimeFormat(locale(), options);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment