Skip to content

Commit 64a5c11

Browse files
author
nicosammito
committed
fix: skip undefined and null values in normalizeObjectForComparison
1 parent e61b159 commit 64a5c11

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/utils/generics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ const normalizeObjectForComparison = (value: unknown): unknown => {
100100
if (isPlainObject(value)) {
101101
const normalized: Record<string, unknown> = {};
102102
Object.entries(value).forEach(([key, val]) => {
103+
if (val === undefined || val === null) return
103104
if (key === "__typename" || key === "id" || key === "createdAt" || key === "updatedAt") return;
104105
normalized[key] = normalizeObjectForComparison(val);
105106
});

0 commit comments

Comments
 (0)