From 3db8403e0aec47ad36aa1f66f0ff81b17fff2ae0 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sun, 7 Feb 2021 00:07:48 +0200 Subject: [PATCH] fix detailed map date validator --- lib/validators/detailedMap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validators/detailedMap.ts b/lib/validators/detailedMap.ts index 1c6d1eb8d..9731c795a 100644 --- a/lib/validators/detailedMap.ts +++ b/lib/validators/detailedMap.ts @@ -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;