Fix: Appwrite-Patch nutzt _isBigNumber statt isBigNumber (behebt 'e.isBigNumber is not a function' im Build)
This commit is contained in:
@@ -2,19 +2,12 @@ diff --git a/node_modules/appwrite/dist/esm/sdk.js b/node_modules/appwrite/dist/
|
|||||||
index b1fcf3b..4ba8d80 100644
|
index b1fcf3b..4ba8d80 100644
|
||||||
--- a/node_modules/appwrite/dist/esm/sdk.js
|
--- a/node_modules/appwrite/dist/esm/sdk.js
|
||||||
+++ b/node_modules/appwrite/dist/esm/sdk.js
|
+++ b/node_modules/appwrite/dist/esm/sdk.js
|
||||||
@@ -1,5 +1,6 @@
|
@@ -466,7 +466,7 @@ const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
||||||
import JSONbigModule from 'json-bigint';
|
|
||||||
import BigNumber from 'bignumber.js';
|
|
||||||
+const __BN = (BigNumber && typeof BigNumber.default === 'function') ? BigNumber.default : BigNumber;
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
@@ -468,7 +469,7 @@ const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
|
||||||
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
||||||
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
||||||
function reviver(_key, value) {
|
function reviver(_key, value) {
|
||||||
- if (BigNumber.isBigNumber(value)) {
|
- if (BigNumber.isBigNumber(value)) {
|
||||||
+ if (__BN.isBigNumber(value)) {
|
+ if (value && value._isBigNumber === true) {
|
||||||
if (value.isInteger()) {
|
if (value.isInteger()) {
|
||||||
const str = value.toFixed();
|
const str = value.toFixed();
|
||||||
const bi = BigInt(str);
|
const bi = BigInt(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user