Skip to content

Commit

Permalink
update array data in snapshot correct when the new value is null
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jan 15, 2025
1 parent 9c02863 commit a0f0076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Onyx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ function updateSnapshots(data: OnyxUpdate[]) {
return;
}

if (Array.isArray(value)) {
updatedData[key] = value;
if (Array.isArray(value) || Array.isArray(snapshotData[key])) {
updatedData[key] = value || [];
return;
}

Expand Down

0 comments on commit a0f0076

Please sign in to comment.