Bläddra i källkod

修复表单没填信息时报错的问题

xujunjie 1 år sedan
förälder
incheckning
406469bfd2
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      src/components/DDComponents/DIYTable/index.tsx

+ 2 - 0
src/components/DDComponents/DIYTable/index.tsx

@@ -253,6 +253,8 @@ function DIYTable(props: IProps) {
           // 把每一行的数据提出来到一个对象里
           const row = typeof rows[index] === 'string' ? JSON.parse(rows[index]) : rows[index];
           const rowData: any = {};
+
+          if (!row) break;
           if (displayOnly) {
             row.forEach((col: any) => {
               if (col) {