From a826d710f4143cefe75e3f64e3a71a503c2de619 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Fri, 24 Feb 2023 20:42:35 +0100 Subject: [PATCH] Bugfix for RangeError: Maximum call stack size exceeded --- apps/api/src/helper/object.helper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/api/src/helper/object.helper.ts b/apps/api/src/helper/object.helper.ts index 7ee07b468..6db53b0a1 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 object redactedObject[property] = redactAttributes({ options,