From c2068aa9573fb280752f8673f809344a4b027a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 3 Dec 2018 11:06:45 +0800 Subject: [PATCH] fix #3035,w ill report an error when data is empty --- src/components/StandardTable/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/StandardTable/index.js b/src/components/StandardTable/index.js index 04233543..c0c17251 100644 --- a/src/components/StandardTable/index.js +++ b/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, -- GitLab