Skip to content

Commit

Permalink
Merge pull request #359 from margelo/@chrispader/remove-duplicate-mer…
Browse files Browse the repository at this point in the history
…ge-from-idbkeyval

Use "set" in IDBKeyVal.mergeItem instead of duplicate merge logic
  • Loading branch information
cristipaval authored Sep 25, 2023
2 parents 6121da3 + a46ff2e commit 5e6ab09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/storage/providers/IDBKeyVal.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const provider = {
* @return {Promise<void>}
*/
mergeItem(key, _changes, modifiedData) {
return provider.multiMerge([[key, modifiedData]]);
// Since Onyx also merged the existing value with the changes, we can just set the value directly
return provider.setItem(key, modifiedData);
},

/**
Expand Down

0 comments on commit 5e6ab09

Please sign in to comment.