@infrab4a/connect 1.0.0-beta.21 → 1.0.0-beta.22

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.
@@ -1755,7 +1755,7 @@
1755
1755
  fromFirestore: function (snap) {
1756
1756
  var data = snap.data();
1757
1757
  Object.keys(data).forEach(function (key) {
1758
- if (typeof data[key] === 'object' && '_seconds' in data[key]) {
1758
+ if (data[key] && typeof data[key] === 'object' && '_seconds' in data[key]) {
1759
1759
  data[key] = data[key].toDate();
1760
1760
  }
1761
1761
  });
@@ -1861,14 +1861,14 @@
1861
1861
  return _this;
1862
1862
  }
1863
1863
  FindFirestore.prototype.find = function (_a) {
1864
- var filters = _a.filters, limits = _a.limits, orderBy = _a.orderBy;
1864
+ var _b = _a === void 0 ? {} : _a, filters = _b.filters, limits = _b.limits, orderBy = _b.orderBy;
1865
1865
  return __awaiter(this, void 0, void 0, function () {
1866
1866
  var query, docs, data;
1867
1867
  return __generator(this, function (_a) {
1868
1868
  switch (_a.label) {
1869
1869
  case 0:
1870
- query = this.collection(this.buildCollectionPathForFind(filters));
1871
- query = this.makeFirestoreWhere(query, filters);
1870
+ query = this.collection(this.buildCollectionPathForFind(filters || {}));
1871
+ query = this.makeFirestoreWhere(query, filters || {});
1872
1872
  Object.keys(orderBy || {}).forEach(function (fieldName) { return (query = query.orderBy(fieldName, orderBy[fieldName])); });
1873
1873
  return [4 /*yield*/, this.defineLimits(query, filters, limits)];
1874
1874
  case 1: