react-native-onyx 1.0.20 → 1.0.21

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/lib/Onyx.js CHANGED
@@ -262,7 +262,7 @@ function keysChanged(collectionKey, partialCollection) {
262
262
  // individual collection key member for the collection that is being updated. It is important to note that the collection parameter cane be a PARTIAL collection
263
263
  // and does not represent all of the combined keys and values for a collection key. It is just the "new" data that was merged in via mergeCollection().
264
264
  const stateMappingKeys = _.keys(callbackToStateMapping);
265
- for (let i = stateMappingKeys.length; i--;) {
265
+ for (let i = 0; i < stateMappingKeys.length; i++) {
266
266
  const subscriber = callbackToStateMapping[stateMappingKeys[i]];
267
267
  if (!subscriber) {
268
268
  continue;
@@ -383,7 +383,7 @@ function keyChanged(key, data) {
383
383
  // notify them if the key that changed is a collection member. Or if it is a regular key notify them when there is an exact match. Depending on whether the subscriber
384
384
  // was connected via withOnyx we will call setState() directly on the withOnyx instance. If it is a regular connection we will pass the data to the provided callback.
385
385
  const stateMappingKeys = _.keys(callbackToStateMapping);
386
- for (let i = stateMappingKeys.length; i--;) {
386
+ for (let i = 0; i < stateMappingKeys.length; i++) {
387
387
  const subscriber = callbackToStateMapping[stateMappingKeys[i]];
388
388
  if (!subscriber || !isKeyMatch(subscriber.key, key)) {
389
389
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-onyx",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "author": "Expensify, Inc.",
5
5
  "homepage": "https://expensify.com",
6
6
  "description": "State management for React Native",