Skip to content

Commit

Permalink
fix: ref-masking irrelevant schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
omermecitoglu committed Oct 23, 2024
1 parent 9c0687e commit ae1b67c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/deepEqual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export default function deepEqual(a: unknown, b: unknown): boolean {
if (Array.isArray(a) && Array.isArray(b)) {
return a.every((item, index) => deepEqual(item, b[index]));
}
return Object.entries(a).every(([key, value]) => deepEqual(value, (b as Record<string, unknown>)[key]));
if (Object.keys(a).length !== Object.keys(b).length) return false;
return Object.entries(a).every(([key, value]) => {
return deepEqual(value, (b as Record<string, unknown>)[key]);
});
}
case "function":
case "symbol":
Expand Down

0 comments on commit ae1b67c

Please sign in to comment.