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.
package/dist/web.development.js
CHANGED
|
@@ -2132,6 +2132,9 @@ const webStorage = {
|
|
|
2132
2132
|
this.removeItems = (keys) => _providers_IDBKeyVal__WEBPACK_IMPORTED_MODULE_1__["default"].removeItems(keys).
|
|
2133
2133
|
then(() => raiseStorageSyncManyKeysEvent(keys));
|
|
2134
2134
|
|
|
2135
|
+
this.mergeItem = (key, batchedChanges, modifiedData) => _providers_IDBKeyVal__WEBPACK_IMPORTED_MODULE_1__["default"].mergeItem(key, batchedChanges, modifiedData).
|
|
2136
|
+
then(() => raiseStorageSyncEvent(key));
|
|
2137
|
+
|
|
2135
2138
|
// If we just call Storage.clear other tabs will have no idea which keys were available previously
|
|
2136
2139
|
// so that they can call keysChanged for them. That's why we iterate over every key and raise a storage sync
|
|
2137
2140
|
// event for each one
|
|
@@ -2264,7 +2267,8 @@ const provider = {
|
|
|
2264
2267
|
* @return {Promise<void>}
|
|
2265
2268
|
*/
|
|
2266
2269
|
mergeItem(key, _changes, modifiedData) {
|
|
2267
|
-
|
|
2270
|
+
// Since Onyx also merged the existing value with the changes, we can just set the value directly
|
|
2271
|
+
return provider.setItem(key, modifiedData);
|
|
2268
2272
|
},
|
|
2269
2273
|
|
|
2270
2274
|
/**
|