@infrab4a/connect 0.8.1-beta.0 → 0.8.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.
@@ -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 new model(Object.keys(params).reduce(function (data, currentKey) {
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));