mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-26 05:56:47 +08:00
Bug fix
This commit is contained in:
2
utils.ts
2
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) {
|
||||
|
||||
Reference in New Issue
Block a user