Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Bugfix/fix maximum call stack size exceeded error in value redaction (#1743)
Thomas Kaulaef840c2ccc7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 087480e8d2..b2c0912f17 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Fixed+- Fixed `RangeError: Maximum call stack size exceeded` for values of type `Big` in the value redaction interceptor for the impersonation mode- Reset the letter spacing in buttons## 1.237.0 - 2023-02-19diff --git a/apps/api/src/helper/object.helper.ts b/apps/api/src/helper/object.helper.tsindex 7ee07b4685..6db53b0a18 100644--- a/apps/api/src/helper/object.helper.ts+++ b/apps/api/src/helper/object.helper.ts@@ -1,3 +1,4 @@+import Big from 'big.js';import { cloneDeep, isArray, isObject } from 'lodash';export function hasNotDefinedValuesInObject(aObject: Object): boolean {@@ -59,7 +60,10 @@ export function redactAttributes({return redactAttributes({ options, object: currentObject });});- } else if (isObject(redactedObject[property])) {+ } else if (+ isObject(redactedObject[property]) &&+ !(redactedObject[property] instanceof Big)+ ) {// Recursively call the function on the nested objectredactedObject[property] = redactAttributes({options,