mirror of
https://github.com/tornadocash/websnark.git
synced 2025-01-15 15:38:28 +01:00
avoid iterating already unstringified bigint's properties
This commit is contained in:
parent
3b6cf0c77e
commit
236664f194
@ -43,7 +43,7 @@ function unstringifyBigInts(o) {
|
|||||||
return bigInt(o);
|
return bigInt(o);
|
||||||
} else if (Array.isArray(o)) {
|
} else if (Array.isArray(o)) {
|
||||||
return o.map(unstringifyBigInts);
|
return o.map(unstringifyBigInts);
|
||||||
} else if (typeof o == "object") {
|
} else if (typeof o == "object" && !(o instanceof bigInt)) {
|
||||||
const res = {};
|
const res = {};
|
||||||
for (let k in o) {
|
for (let k in o) {
|
||||||
res[k] = unstringifyBigInts(o[k]);
|
res[k] = unstringifyBigInts(o[k]);
|
||||||
|
Loading…
Reference in New Issue
Block a user