dataflux 1.18.0 → 1.18.2
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/Model.js +1 -1
- package/dist/ObserverStore.js +12 -7
- package/dist/Store.js +5 -1
- package/dist/dataflux.min.js +1 -1
- package/dist/dataflux.min.js.map +1 -1
- package/package.json +3 -3
package/dist/Model.js
CHANGED
|
@@ -443,7 +443,7 @@ var Model = exports["default"] = /*#__PURE__*/_createClass(function Model(name)
|
|
|
443
443
|
|
|
444
444
|
if (this.options.autoRefresh && typeof this.options.autoRefresh === "number") {
|
|
445
445
|
setInterval(function () {
|
|
446
|
-
_this.getStore().refresh(_classPrivateFieldGet(_type, _this));
|
|
446
|
+
_this.getStore().refresh(_classPrivateFieldGet(_type, _this))["catch"](function () {});
|
|
447
447
|
}, this.options.autoRefresh);
|
|
448
448
|
}
|
|
449
449
|
});
|
package/dist/ObserverStore.js
CHANGED
|
@@ -189,13 +189,18 @@ var ObserverStore = /*#__PURE__*/function (_PersistentStore) {
|
|
|
189
189
|
var objects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
190
190
|
return (_classPrivateFieldGet(_unsubPromises, _this).length ? Promise.all(_classPrivateFieldGet(_unsubPromises, _this)) : Promise.resolve()).then(function () {
|
|
191
191
|
if (objects.length) {
|
|
192
|
-
var
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
var
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
var _objects$;
|
|
193
|
+
var type = objects === null || objects === void 0 || (_objects$ = objects[0]) === null || _objects$ === void 0 || (_objects$ = _objects$.getModel()) === null || _objects$ === void 0 ? void 0 : _objects$.getType();
|
|
194
|
+
if (type) {
|
|
195
|
+
var uniqueSubs = _classPrivateFieldGet(_getUniqueSubs, _this).call(_this, objects, type);
|
|
196
|
+
(0, _batchPromises["default"])(10, uniqueSubs, function (_ref3) {
|
|
197
|
+
var callback = _ref3.callback,
|
|
198
|
+
filterFunction = _ref3.filterFunction;
|
|
199
|
+
return _this.find(type, filterFunction).then(callback);
|
|
200
|
+
});
|
|
201
|
+
} else {
|
|
202
|
+
console.log("Malformed update list", objects);
|
|
203
|
+
}
|
|
199
204
|
}
|
|
200
205
|
return objects;
|
|
201
206
|
});
|
package/dist/Store.js
CHANGED
|
@@ -128,7 +128,9 @@ var Store = exports["default"] = /*#__PURE__*/function () {
|
|
|
128
128
|
return (0, _batchPromises["default"])(4, objects, function (object) {
|
|
129
129
|
return item.model.factory(object.object).then(function (items) {
|
|
130
130
|
list = list.concat(items);
|
|
131
|
-
})
|
|
131
|
+
})["catch"](function () {
|
|
132
|
+
delete item.promise;
|
|
133
|
+
}); // Nothing
|
|
132
134
|
}).then(function () {
|
|
133
135
|
return list;
|
|
134
136
|
});
|
|
@@ -466,6 +468,8 @@ var Store = exports["default"] = /*#__PURE__*/function () {
|
|
|
466
468
|
status: "end",
|
|
467
469
|
model: type
|
|
468
470
|
});
|
|
471
|
+
})["catch"](function () {
|
|
472
|
+
delete item.promise;
|
|
469
473
|
});
|
|
470
474
|
return item.promise;
|
|
471
475
|
}
|