Revisit timestamp UTC conversion during log download

This commit is contained in:
Serkan Reis 2023-05-03 21:50:15 +03:00
parent 0f8c9dfe7a
commit ec253bd8f7

View File

@ -123,9 +123,9 @@ export const LogModal = (props: LogModalProps) => {
onClick={() => {
const csv = logs.itemList
.map((logItem) => {
return `${logItem.type as string},${logItem.message},${(logItem.timestamp as Date)
.toUTCString()
.replace(',', '')}`
return `${logItem.type as string},${logItem.message},${
logItem.timestamp ? new Date(logItem.timestamp).toUTCString().replace(',', '') : ''
}`
})
.join('\n')
const blob = new Blob([csv], { type: 'text/csv' })