avoid iterating already unstringified bigint's properties

This commit is contained in:
poma 2019-07-15 13:42:07 +03:00
parent 3b6cf0c77e
commit 236664f194
1 changed files with 1 additions and 1 deletions

View File

@ -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]);