Skip to content

Commit

Permalink
Support bigint in builtin serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
lorefnon committed Sep 21, 2023
1 parent 6ab687e commit 9f3f094
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/browser/helper.jsonStringifyRecursive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
3 changes: 3 additions & 0 deletions src/runtime/nodejs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ export function transportJSON<LogObj>(json: LogObj & ILogObjMeta): void {
// Store value in our collection
cache.add(value);
}
if (typeof value === "bigint") {
return `${value}`;
}
return value;
});
}
Expand Down

0 comments on commit 9f3f094

Please sign in to comment.