From 088ccc7ccdfa5d2de8f2bb8976f5b52646fd6fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=B7=E9=BE=99?= Date: Fri, 29 Aug 2025 07:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ui/character-tab-content.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ui/character-tab-content.tsx b/components/ui/character-tab-content.tsx index 44bcd92..dd11a36 100644 --- a/components/ui/character-tab-content.tsx +++ b/components/ui/character-tab-content.tsx @@ -96,7 +96,7 @@ CharacterTabContentProps useEffect(() => { console.log('-==========roleData===========-', roleData); // 只在初始化且有角色数据时执行 - if (!isInitialized && roleData.length > 0) { + if (!isInitialized && (roleData?.length || 0) > 0) { selectRole(roleData[0]); setIsInitialized(true); } @@ -391,7 +391,7 @@ CharacterTabContentProps )} - +