70 lines
2.8 KiB
Diff
70 lines
2.8 KiB
Diff
diff --git a/node_modules/@sentry/utils/cjs/object.js b/node_modules/@sentry/utils/cjs/object.js
|
|
index a6151b5..67dcf57 100644
|
|
--- a/node_modules/@sentry/utils/cjs/object.js
|
|
+++ b/node_modules/@sentry/utils/cjs/object.js
|
|
@@ -203,7 +203,11 @@ function dropUndefinedKeys(inputValue) {
|
|
return _dropUndefinedKeys(inputValue, memoizationMap);
|
|
}
|
|
|
|
-function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
+function _dropUndefinedKeys(inputValue, memoizationMap, depth = 0) {
|
|
+ if (depth >= 5) {
|
|
+ return inputValue;
|
|
+ }
|
|
+
|
|
if (isPojo(inputValue)) {
|
|
// If this node has already been visited due to a circular reference, return the object it was mapped to in the new object
|
|
const memoVal = memoizationMap.get(inputValue);
|
|
@@ -217,7 +221,7 @@ function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
|
|
for (const key of Object.keys(inputValue)) {
|
|
if (typeof inputValue[key] !== 'undefined') {
|
|
- returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
|
|
+ returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap, depth + 1);
|
|
}
|
|
}
|
|
|
|
@@ -236,7 +240,7 @@ function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
memoizationMap.set(inputValue, returnValue);
|
|
|
|
inputValue.forEach((item) => {
|
|
- returnValue.push(_dropUndefinedKeys(item, memoizationMap));
|
|
+ returnValue.push(_dropUndefinedKeys(item, memoizationMap, depth + 1));
|
|
});
|
|
|
|
return returnValue ;
|
|
diff --git a/node_modules/@sentry/utils/esm/object.js b/node_modules/@sentry/utils/esm/object.js
|
|
index c63c177..3e43a58 100644
|
|
--- a/node_modules/@sentry/utils/esm/object.js
|
|
+++ b/node_modules/@sentry/utils/esm/object.js
|
|
@@ -201,7 +201,11 @@ function dropUndefinedKeys(inputValue) {
|
|
return _dropUndefinedKeys(inputValue, memoizationMap);
|
|
}
|
|
|
|
-function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
+function _dropUndefinedKeys(inputValue, memoizationMap, depth = 0) {
|
|
+ if (depth >= 5) {
|
|
+ return inputValue;
|
|
+ }
|
|
+
|
|
if (isPojo(inputValue)) {
|
|
// If this node has already been visited due to a circular reference, return the object it was mapped to in the new object
|
|
const memoVal = memoizationMap.get(inputValue);
|
|
@@ -215,7 +219,7 @@ function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
|
|
for (const key of Object.keys(inputValue)) {
|
|
if (typeof inputValue[key] !== 'undefined') {
|
|
- returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
|
|
+ returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap, depth + 1);
|
|
}
|
|
}
|
|
|
|
@@ -234,7 +238,7 @@ function _dropUndefinedKeys(inputValue, memoizationMap) {
|
|
memoizationMap.set(inputValue, returnValue);
|
|
|
|
inputValue.forEach((item) => {
|
|
- returnValue.push(_dropUndefinedKeys(item, memoizationMap));
|
|
+ returnValue.push(_dropUndefinedKeys(item, memoizationMap, depth + 1));
|
|
});
|
|
|
|
return returnValue ;
|