Bugfix/fix maximum call stack size exceeded error in value redaction (#1743)

* Bugfix for RangeError: Maximum call stack size exceeded

* Update changelog
pull/1740/head^2
Thomas Kaul 2 years ago committed by GitHub
parent 80d0638922
commit aef840c2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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-19

@ -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