We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c6fb73 commit 6dd4083Copy full SHA for 6dd4083
1 file changed
lib/Onyx.ts
@@ -238,6 +238,11 @@ function multiSet(data: OnyxMultiSetInput): Promise<void> {
238
239
const updatePromises = keyValuePairsToSet.map(([key, value]) => {
240
const prevValue = cache.get(key, false);
241
+ // When we use multiSet to set a key we want to clear the current delta changes from Onyx.merge that were queued
242
+ // before the value was set. If Onyx.merge is currently reading the old value from storage, it will then not apply the changes.
243
+ if (OnyxUtils.hasPendingMergeForKey(key)) {
244
+ delete OnyxUtils.getMergeQueue()[key];
245
+ }
246
247
// Update cache and optimistically inform subscribers on the next tick
248
cache.set(key, value);
0 commit comments