Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lifegpc committed May 31, 2024
1 parent 8437bf1 commit 8ea3ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ea3ee9

Please sign in to comment.