Fix: json-bigint stringify nutzt _isBigNumber (behebt e.isBigNumber in prepareRequest)
This commit is contained in:
@@ -11,7 +11,7 @@ index bb4e5eb..0ea96e8 100644
|
|||||||
// Bignumber has stricter check: everything with length > 15 digits disallowed
|
// Bignumber has stricter check: everything with length > 15 digits disallowed
|
||||||
if (string.length > 15)
|
if (string.length > 15)
|
||||||
diff --git a/node_modules/json-bigint/lib/stringify.js b/node_modules/json-bigint/lib/stringify.js
|
diff --git a/node_modules/json-bigint/lib/stringify.js b/node_modules/json-bigint/lib/stringify.js
|
||||||
index 3bd5269..2c9f5b4 100644
|
index 3bd5269..ab80d3e 100644
|
||||||
--- a/node_modules/json-bigint/lib/stringify.js
|
--- a/node_modules/json-bigint/lib/stringify.js
|
||||||
+++ b/node_modules/json-bigint/lib/stringify.js
|
+++ b/node_modules/json-bigint/lib/stringify.js
|
||||||
@@ -1,4 +1,5 @@
|
@@ -1,4 +1,5 @@
|
||||||
@@ -20,3 +20,12 @@ index 3bd5269..2c9f5b4 100644
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
json2.js
|
json2.js
|
||||||
|
@@ -215,7 +216,7 @@ var JSON = module.exports;
|
||||||
|
mind = gap,
|
||||||
|
partial,
|
||||||
|
value = holder[key],
|
||||||
|
- isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value));
|
||||||
|
+ isBigNumber = value != null && (value instanceof BigNumber || (value && value._isBigNumber === true));
|
||||||
|
|
||||||
|
// If the value has a toJSON method, call it to obtain a replacement value.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user