fix detailed map date validator

This commit is contained in:
Kalle (Sendou)
2021-02-07 00:07:48 +02:00
parent 8eb6cb83c7
commit 3db8403e0a

View File

@@ -29,7 +29,7 @@ export const detailedMapSchema = z.array(
winners: teamInfoSchema,
losers: teamInfoSchema,
date: z.string().refine((val) => {
const d = new Date(val);
const d = new Date(Number(val));
const timestamp = d.getTime();
if (Number.isNaN(timestamp)) {
return false;