@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.
- package/bundles/infrab4a-connect.umd.js +4 -4
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +4 -4
- package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +2 -2
- package/fesm2015/infrab4a-connect.js +4 -4
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 =
|
|
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:
|