@byteluck-fe/model-driven-engine 2.3.5 → 2.3.7

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.
@@ -495,7 +495,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
495
495
  }, {});
496
496
  // @ts-ignore
497
497
  var emptyState = this.getEmptyState(instance.id);
498
- return newValue.map(function(row) {
498
+ return newValue === null || newValue === void 0 ? void 0 : newValue.map(function(row) {
499
499
  return(// @ts-ignore
500
500
  checkerSubtableValue(fieldTypeMap, row, emptyState));
501
501
  });
@@ -1213,12 +1213,13 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1213
1213
  newState[mapping.dataViewId][mapping.controlId].push(newRow);
1214
1214
  });
1215
1215
  } else if (entity) {
1216
+ var _Object_keys;
1216
1217
  var skipKey = [] //qiyu ObjectDataBind中会提前将相关key拿出来赋值,为了避免重复赋值,设置了此变量
1217
1218
  ;
1218
1219
  var emptyState = JSONCopy(_this.store.emptyState);
1219
- if (!Object.keys(entity).length) {
1220
+ if (!((_Object_keys = Object.keys(entity)) === null || _Object_keys === void 0 ? void 0 : _Object_keys.length)) {
1220
1221
  //判断entity 为空对象就给表单赋值默认值
1221
- newState = emptyState;
1222
+ newState = JSONCopy(emptyState);
1222
1223
  } else {
1223
1224
  Object.keys(entity).map(function(fieldCode) {
1224
1225
  if (skipKey.includes(fieldCode)) {