Skip to content

Commit 4ed361a

Browse files
authored
Merge pull request #611 from nkdengineer/fix/55288
Update array data in snapshot correct when the new value is null
2 parents 9c02863 + a0f0076 commit 4ed361a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Onyx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ function updateSnapshots(data: OnyxUpdate[]) {
582582
return;
583583
}
584584

585-
if (Array.isArray(value)) {
586-
updatedData[key] = value;
585+
if (Array.isArray(value) || Array.isArray(snapshotData[key])) {
586+
updatedData[key] = value || [];
587587
return;
588588
}
589589

0 commit comments

Comments
 (0)