react-native-onyx 1.0.88 → 1.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -40,6 +40,9 @@ const webStorage = {
|
|
|
40
40
|
this.removeItems = keys => Storage.removeItems(keys)
|
|
41
41
|
.then(() => raiseStorageSyncManyKeysEvent(keys));
|
|
42
42
|
|
|
43
|
+
this.mergeItem = (key, batchedChanges, modifiedData) => Storage.mergeItem(key, batchedChanges, modifiedData)
|
|
44
|
+
.then(() => raiseStorageSyncEvent(key));
|
|
45
|
+
|
|
43
46
|
// If we just call Storage.clear other tabs will have no idea which keys were available previously
|
|
44
47
|
// so that they can call keysChanged for them. That's why we iterate over every key and raise a storage sync
|
|
45
48
|
// event for each one
|
|
@@ -70,7 +70,8 @@ const provider = {
|
|
|
70
70
|
* @return {Promise<void>}
|
|
71
71
|
*/
|
|
72
72
|
mergeItem(key, _changes, modifiedData) {
|
|
73
|
-
|
|
73
|
+
// Since Onyx also merged the existing value with the changes, we can just set the value directly
|
|
74
|
+
return provider.setItem(key, modifiedData);
|
|
74
75
|
},
|
|
75
76
|
|
|
76
77
|
/**
|