小问题

This commit is contained in:
海龙 2025-08-29 07:24:30 +08:00
parent db7debaa52
commit 088ccc7ccd

View File

@ -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
</div>
</motion.div>
)}
<FloatingGlassPanel
open={isReplacePanelOpen}
@ -455,4 +455,4 @@ CharacterTabContentProps
);
});
CharacterTabContent.displayName = 'CharacterTabContent';
CharacterTabContent.displayName = 'CharacterTabContent';