From 5b9252247a5118ae3ac783e0f1dfa3d4112062e1 Mon Sep 17 00:00:00 2001 From: xiaokang Date: Wed, 27 Nov 2024 11:01:08 +0800 Subject: [PATCH] fix: add selectTab empty case --- src/page/Workspace/SideBar/components/SideTabs/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/page/Workspace/SideBar/components/SideTabs/index.tsx b/src/page/Workspace/SideBar/components/SideTabs/index.tsx index 8550b6e27..1296fdf35 100644 --- a/src/page/Workspace/SideBar/components/SideTabs/index.tsx +++ b/src/page/Workspace/SideBar/components/SideTabs/index.tsx @@ -84,7 +84,7 @@ export default function SideTabs(props: IProps) { ); })} - + {selectTab?.actions?.map((action) => { if ('render' in action) { return action.render(); @@ -100,12 +100,12 @@ export default function SideTabs(props: IProps) {
{tabs .map((tab) => { - if (loadedKeys.current.has(tab.key) || selectTab.key === tab.key) { + if (loadedKeys.current.has(tab.key) || selectTab?.key === tab.key) { return (
{tab?.render?.()}