We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cf3b8d commit 3ad6ea7Copy full SHA for 3ad6ea7
packages/expect-utils/src/utils.ts
@@ -144,9 +144,11 @@ export const getObjectSubset = (
144
const trimmed: any = {};
145
seenReferences.set(object, trimmed);
146
147
- for (const key of getObjectKeys(object).filter(key =>
148
- hasPropertyInObject(subset, key),
149
- )) {
+ for (const key of getObjectKeys(object)) {
+ if (!hasPropertyInObject(subset, key)) {
+ continue;
150
+ }
151
+
152
trimmed[key] = seenReferences.has(object[key])
153
? seenReferences.get(object[key])
154
: getObjectSubset(
0 commit comments