@infrab4a/connect 0.8.1 → 0.8.3
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 +3 -3
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/lib/infra/firebase/firestore/mixins/with-firestore.mixin.js +2 -2
- package/esm2015/lib/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +2 -2
- package/fesm2015/infrab4a-connect.js +2 -2
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +2 -2
|
@@ -1150,7 +1150,7 @@
|
|
|
1150
1150
|
class_1.prototype.buildModelInstance = function () {
|
|
1151
1151
|
var _this = this;
|
|
1152
1152
|
return {
|
|
1153
|
-
toFirestore: function (data) { return data.toPlain(); },
|
|
1153
|
+
toFirestore: function (data) { return ((data === null || data === void 0 ? void 0 : data.toPlain) ? data.toPlain() : data); },
|
|
1154
1154
|
fromFirestore: function (snap) {
|
|
1155
1155
|
var data = snap.data();
|
|
1156
1156
|
Object.keys(data).forEach(function (key) {
|
|
@@ -1399,10 +1399,10 @@
|
|
|
1399
1399
|
var model = this.model;
|
|
1400
1400
|
if (params instanceof model)
|
|
1401
1401
|
return params;
|
|
1402
|
-
return
|
|
1402
|
+
return Object.keys(params).reduce(function (data, currentKey) {
|
|
1403
1403
|
var _b;
|
|
1404
1404
|
return (Object.assign(Object.assign({}, data), (_b = {}, _b[currentKey] = getValueByAction(params[currentKey]), _b)));
|
|
1405
|
-
}, {})
|
|
1405
|
+
}, {});
|
|
1406
1406
|
};
|
|
1407
1407
|
return UpdateFirestore;
|
|
1408
1408
|
}(MixinBase));
|