Showing
1 changed file
with
1 additions
and
1 deletions
@@ -10,7 +10,7 @@ export function formatToDateTime( | @@ -10,7 +10,7 @@ export function formatToDateTime( | ||
10 | date: moment.MomentInput = undefined, | 10 | date: moment.MomentInput = undefined, |
11 | format = DATE_TIME_FORMAT | 11 | format = DATE_TIME_FORMAT |
12 | ): string { | 12 | ): string { |
13 | - return moment(date).format(format); | 13 | + return date ? moment(date).format(format) : ''; |
14 | } | 14 | } |
15 | 15 | ||
16 | export function formatToDate(date: moment.MomentInput = undefined, format = DATE_FORMAT): string { | 16 | export function formatToDate(date: moment.MomentInput = undefined, format = DATE_FORMAT): string { |