From c1445d80dee99aeac14f5b29eda4b240fd47bf3f Mon Sep 17 00:00:00 2001 From: wanghaitao <15124505701@163.com> Date: Sat, 28 Aug 2021 03:48:03 +0800 Subject: [PATCH] Table: fix Destructuring assignment bug (#2893) --- packages/components/table/src/store/current.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/table/src/store/current.ts b/packages/components/table/src/store/current.ts index 6a8589e730..612019504a 100644 --- a/packages/components/table/src/store/current.ts +++ b/packages/components/table/src/store/current.ts @@ -22,11 +22,11 @@ function useCurrent(watcherData: WatcherPropsData) { } const setCurrentRowByKey = (key: string) => { - const { data = [], rowKey } = watcherData + const { data, rowKey } = watcherData let _currentRow = null if (rowKey.value) { _currentRow = arrayFind( - unref(data), + unref(data) || [], item => getRowIdentity(item, rowKey.value) === key, ) }