瀏覽代碼

Fix workId undefined, close #246

afc163 8 年之前
父節點
當前提交
c206828c60
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/routes/Forms/TableForm.js

+ 1 - 1
src/routes/Forms/TableForm.js

@@ -88,7 +88,7 @@ export default class TableForm extends PureComponent {
         this.clickedCancel = false;
         return;
       }
-      const target = this.getRowByKey(key);
+      const target = this.getRowByKey(key) || {};
       if (!target.workId || !target.name || !target.department) {
         message.error('请填写完整成员信息。');
         e.target.focus();