fix: make it work with new vite
This commit is contained in:
@@ -36,9 +36,10 @@ export async function getLogs() {
|
||||
.map((line) => {
|
||||
const [date, ...rest] = line.split(" | ");
|
||||
const parsed = JSON.parse(rest.join(" | ")) as Log;
|
||||
const dateObj = new Date(date);
|
||||
return {
|
||||
...parsed,
|
||||
date: new Date(date),
|
||||
date: isNaN(dateObj.getTime()) ? new Date() : dateObj,
|
||||
} as Log;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user