Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
avoid iterating already unstringified bigint's properties
  • Loading branch information
poma committed Jul 15, 2019
commit 236664f194b7e2ee93f79004607faf7e31b1b73e
2 changes: 1 addition & 1 deletion tools/stringifybigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function unstringifyBigInts(o) {
return bigInt(o);
} else if (Array.isArray(o)) {
return o.map(unstringifyBigInts);
} else if (typeof o == "object") {
} else if (typeof o == "object" && !(o instanceof bigInt)) {
const res = {};
for (let k in o) {
res[k] = unstringifyBigInts(o[k]);
Expand Down