Skip to content

Commit

Permalink
Merge pull request #533 from blazejkustra/ts/Onyx-private-methods
Browse files Browse the repository at this point in the history
Fix `applyMerge` after Typescript migration
  • Loading branch information
stitesExpensify authored Apr 17, 2024
2 parents 8f7c70c + f841b5b commit 0e99788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OnyxUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ function applyMerge(existingValue: OnyxValue<OnyxKey>, changes: Array<OnyxValue<
return lastChange;
}

if (changes.some((change) => typeof change === 'object')) {
if (changes.some((change) => change && typeof change === 'object')) {
// Object values are then merged one after the other
return changes.reduce(
(modifiedData, change) => utils.fastMerge(modifiedData as Record<OnyxKey, unknown>, change as Record<OnyxKey, unknown>, shouldRemoveNullObjectValues),
Expand Down

0 comments on commit 0e99788

Please sign in to comment.