fix: empty date error
This commit is contained in:
parent
70f494766b
commit
d9fb3a8917
|
|
@ -29,7 +29,7 @@ export function useDate() {
|
|||
return dayjs(date).tz(timezone).format(format)
|
||||
},
|
||||
formatToISO: (date: string | Date) => {
|
||||
return dayjs(date).toISOString()
|
||||
return dayjs(date || undefined).toISOString()
|
||||
},
|
||||
inLocalTimezone: (date: string | Date) => {
|
||||
return dayjs(date).tz().toDate()
|
||||
|
|
|
|||
Loading…
Reference in New Issue