dataflux 1.4.3 → 1.4.4

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/README.md CHANGED
@@ -178,8 +178,7 @@ const subscriptions = [
178
178
  ["author"], // No filter function, all objects returned
179
179
  ];
180
180
 
181
- const callback = (data) => {
182
- const {book, author} = data;
181
+ const callback = ({book, author}) => {
183
182
  // Objects are ready
184
183
  };
185
184
 
@@ -105,16 +105,18 @@ var ObserverStore = /*#__PURE__*/function (_PersistentStore) {
105
105
  });
106
106
  };
107
107
 
108
- return Promise.all(subscriptions.map(function (sub, index) {
108
+ return Promise.all(subscriptions.map(function (sub) {
109
109
  var _sub = _slicedToArray(sub, 2),
110
110
  name = _sub[0],
111
111
  _sub$ = _sub[1],
112
112
  filterFunction = _sub$ === void 0 ? null : _sub$;
113
113
 
114
- return _this.subscribe(name, filterFunction, function (data) {
114
+ var wrappedCallback = function wrappedCallback(data) {
115
115
  dataPayload[name] = data;
116
116
  return areAllDone() && callback(dataPayload);
117
- });
117
+ };
118
+
119
+ return _this.subscribe(name, wrappedCallback, filterFunction);
118
120
  })).then(function (subKeys) {
119
121
  var subKey = (0, _uuid.v4)();
120
122
  _this._multipleSubscribed[subKey] = subKeys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataflux",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "DataFlux, automatically interfaces with your REST APIs to create a 2-way-synced local data store. Transparently manages data propagation in the React state.",
5
5
  "main": "dist/index.js",
6
6
  "bin": "dist/index.js",