Przeglądaj źródła

fix #3035,w ill report an error when data is empty

陈帅 7 lat temu
rodzic
commit
c2068aa957
1 zmienionych plików z 2 dodań i 5 usunięć
  1. 2 5
      src/components/StandardTable/index.js

+ 2 - 5
src/components/StandardTable/index.js

@@ -63,11 +63,8 @@ class StandardTable extends PureComponent {
 
   render() {
     const { selectedRowKeys, needTotalList } = this.state;
-    const {
-      data: { list, pagination },
-      rowKey,
-      ...rest
-    } = this.props;
+    const { data = {}, rowKey, ...rest } = this.props;
+    const { list = [], pagination } = data;
 
     const paginationProps = {
       showSizeChanger: true,