Browse Source
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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/helper/object.helper.ts
|
|
@ -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, |
|
|
|