From 94675ed65503e292a16580ba30f82b2748a80d32 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sat, 31 Jan 2026 22:15:07 +0000 Subject: [PATCH] Fixed date parsing issue --- src/services/httpService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/httpService.ts b/src/services/httpService.ts index bdae79c..be0ce93 100644 --- a/src/services/httpService.ts +++ b/src/services/httpService.ts @@ -29,10 +29,11 @@ export function handleDates(body: any) { for (const key of Object.keys(body)) { const value = body[key]; - if (value !== undefined && value !== "" && isNaN(value)) { + if (typeof value === "string" && value !== "" && isNaN(value as any)) { const parsedValue: Date = parseISO(value); if (isValid(parsedValue)) body[key] = parsedValue; - else if (typeof value === "object") handleDates(value); + } else if (typeof value === "object" && value !== null) { + handleDates(value); } } }