diff --git a/src/runtime/browser/helper.jsonStringifyRecursive.ts b/src/runtime/browser/helper.jsonStringifyRecursive.ts index fbab8d9..9b29942 100644 --- a/src/runtime/browser/helper.jsonStringifyRecursive.ts +++ b/src/runtime/browser/helper.jsonStringifyRecursive.ts @@ -9,6 +9,9 @@ export function jsonStringifyRecursive(obj: unknown) { // Store value in our collection cache.add(value); } + if (typeof value === "bigint") { + return `${value}`; + } return value; }); } diff --git a/src/runtime/nodejs/index.ts b/src/runtime/nodejs/index.ts index 3ec8373..ccd4b18 100644 --- a/src/runtime/nodejs/index.ts +++ b/src/runtime/nodejs/index.ts @@ -165,6 +165,9 @@ export function transportJSON(json: LogObj & ILogObjMeta): void { // Store value in our collection cache.add(value); } + if (typeof value === "bigint") { + return `${value}`; + } return value; }); }