Skip to content

Commit

Permalink
Correct failing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAkhmetov committed Sep 9, 2024
1 parent 59478e7 commit 59d4a69
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions context/app/static/js/components/detailPage/provenance/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ export function nonDestructiveMerge<T extends Record<string, unknown>, U extends
return;
}

// More in-depth check to see if the objects are the same
// Allows us to ignore certain timestamp fields
const difference = findDifference(merged[key] as object, value as object).filter(
(diffField) => !ignoredFields.includes(diffField),
);
if (typeof merged[key] === 'object' && typeof value === 'object') {
// Perform a more in-depth check to see if objects are the same when excluding certain fields
const difference = findDifference(merged[key] as object, value!).filter(
(diffField) => !ignoredFields.includes(diffField),
);

if (difference.length === 0) {
return;
if (difference.length === 0) {
return;
}
}

merged[`${key}-${keyMod}`] = value;
Expand Down

0 comments on commit 59d4a69

Please sign in to comment.