File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ function updateSnapshots(data: OnyxUpdate[]) {
556
556
return ;
557
557
}
558
558
559
- let updatedData = { } ;
559
+ let updatedData : Record < string , unknown > = { } ;
560
560
561
561
data . forEach ( ( { key, value} ) => {
562
562
// snapshots are normal keys so we want to skip update if they are written to Onyx
@@ -573,7 +573,10 @@ function updateSnapshots(data: OnyxUpdate[]) {
573
573
return ;
574
574
}
575
575
576
- updatedData = { ...updatedData , [ key ] : lodashPick ( value , Object . keys ( snapshotData [ key ] ) ) } ;
576
+ const oldValue = updatedData [ key ] || { } ;
577
+ const newValue = lodashPick ( value , Object . keys ( snapshotData [ key ] ) ) ;
578
+
579
+ updatedData = { ...updatedData , [ key ] : Object . assign ( oldValue , newValue ) } ;
577
580
} ) ;
578
581
579
582
// Skip the update if there's no data to be merged
You can’t perform that action at this time.
0 commit comments