From ab0bc47143f7bd87351e05cb43f7634c088dfb12 Mon Sep 17 00:00:00 2001 From: Jeremy Scheff Date: Thu, 13 Jun 2024 11:21:42 -0400 Subject: [PATCH] Fix another case of instanceof Date for #98 --- src/lib/cmp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/cmp.ts b/src/lib/cmp.ts index c46fc956..0557df5c 100644 --- a/src/lib/cmp.ts +++ b/src/lib/cmp.ts @@ -5,7 +5,7 @@ const getType = (x: any) => { if (typeof x === "number") { return "Number"; } - if (x instanceof Date) { + if (Object.prototype.toString.call(x) === "[object Date]") { return "Date"; } if (Array.isArray(x)) {