Skip to content

Commit e0e9ce2

Browse files
committed
Rollback to push all merge operations to update() promises instead of the first one
1 parent bde3d6d commit e0e9ce2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Onyx.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,9 @@ function update(data: OnyxUpdate[]): Promise<void> {
612612
return;
613613
}
614614

615-
const mergePromises = operations.map((operation) => {
616-
return merge(key, operation);
615+
operations.forEach((operation) => {
616+
promises.push(() => merge(key, operation));
617617
});
618-
promises.push(() => mergePromises.at(0) ?? Promise.resolve());
619618
});
620619

621620
const snapshotPromises = OnyxUtils.updateSnapshots(data, merge);

0 commit comments

Comments
 (0)