From 2a1f2836f48adbb6ef862a07cc815ae73fd2a4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Sun, 23 Oct 2022 16:06:50 +0800 Subject: [PATCH] fix: Transfer throw error when`titles` is undefined (#38182) Co-authored-by: tangwenhui --- components/transfer/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 9c4eb45938..771c870403 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -398,7 +398,7 @@ class Transfer extends React.Com
> prefixCls={`${prefixCls}-list`} - titleText={titles[0]} + titleText={titles?.[0]} dataSource={leftDataSource} filterOption={filterOption} style={this.handleListStyle(listStyle, 'left')} @@ -434,7 +434,7 @@ class Transfer extends React.Com /> > prefixCls={`${prefixCls}-list`} - titleText={titles[1]} + titleText={titles?.[1]} dataSource={rightDataSource} filterOption={filterOption} style={this.handleListStyle(listStyle, 'right')}