@livequery/client 1.0.29 → 1.0.30

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.
@@ -68,7 +68,7 @@ class CollectionObservable extends rxjs_1.Observable {
68
68
  __classPrivateFieldGet(this, _CollectionObservable_IdMap, "f").set(item.id, __classPrivateFieldGet(this, _CollectionObservable_state, "f").items.length - 1);
69
69
  }
70
70
  sync(stream) {
71
- var _a, _b, _c, _d;
71
+ var _a, _b, _c, _d, _e;
72
72
  for (const { data, error } of stream) {
73
73
  // Error & paging
74
74
  error && (__classPrivateFieldGet(this, _CollectionObservable_state, "f").error = error);
@@ -81,11 +81,11 @@ class CollectionObservable extends rxjs_1.Observable {
81
81
  for (const change of (data === null || data === void 0 ? void 0 : data.changes) || []) {
82
82
  const { data: payload, type } = change;
83
83
  this.$changes.next(change);
84
- const index = __classPrivateFieldGet(this, _CollectionObservable_IdMap, "f").get(payload.id) || -1;
84
+ const index = (_d = __classPrivateFieldGet(this, _CollectionObservable_IdMap, "f").get(payload.id)) !== null && _d !== void 0 ? _d : -1;
85
85
  if (index == -1 && type == 'added') {
86
86
  if (
87
87
  // Is first value from HTTP query
88
- ((_d = data === null || data === void 0 ? void 0 : data.paging) === null || _d === void 0 ? void 0 : _d.n) == 0
88
+ ((_e = data === null || data === void 0 ? void 0 : data.paging) === null || _e === void 0 ? void 0 : _e.n) == 0
89
89
  || (
90
90
  // Is realtime update that match filters
91
91
  Object
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "repository": {
4
4
  "url": "https://github.com/livequery/client"
5
5
  },
6
- "version": "1.0.29",
6
+ "version": "1.0.30",
7
7
  "description": "",
8
8
  "main": "build/index.js",
9
9
  "types": "build/index.d.ts",