Skip to content

Commit a0f0076

Browse files
committed
update array data in snapshot correct when the new value is null
1 parent 9c02863 commit a0f0076

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)