Browse Source

Bugfix for RangeError: Maximum call stack size exceeded

pull/1743/head
Thomas 3 years ago
parent
commit
a826d710f4
  1. 6
      apps/api/src/helper/object.helper.ts

6
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,

Loading…
Cancel
Save