From 8ea3ee98b125c896dd5e00e0c9b0dbfcf343a727 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Fri, 31 May 2024 14:29:29 +0800 Subject: [PATCH] Bug fix --- utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.ts b/utils.ts index 1d11ed3..d6ae1bf 100644 --- a/utils.ts +++ b/utils.ts @@ -300,7 +300,7 @@ export function toJSON(obj: unknown) { export function parseBigInt(str: string) { const t = parseInt(str); if (isNaN(t)) return t; - return Number.isSafeInteger(t) ? BigInt(str) : t; + return !Number.isSafeInteger(t) ? BigInt(str) : t; } export function isNumNaN(num: number | bigint) {