From ad86beca226565fe6498d45b306548748ad70a6a Mon Sep 17 00:00:00 2001 From: terminalchai Date: Mon, 11 May 2026 01:35:31 +0530 Subject: [PATCH] fix(utils): handle null in isJSONSerializable --- src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index a773431b..2e79fc7a 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -18,8 +18,11 @@ export function isJSONSerializable(value: any): boolean { if (value === undefined) { return false; } + if (value === null) { + return true; + } const t = typeof value; - if (t === "string" || t === "number" || t === "boolean" || t === null) { + if (t === "string" || t === "number" || t === "boolean") { return true; } if (t !== "object") {