diff --git a/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts b/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts index 5e5bead339..96dccd4bf8 100644 --- a/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts +++ b/web/app/components/workflow/skill/hooks/use-sync-tree-with-active-tab.ts @@ -25,14 +25,14 @@ export function useSyncTreeWithActiveTab({ const storeApi = useWorkflowStore() useEffect(() => { - if (!activeTabId || activeTabId === START_TAB_ID) + if (!activeTabId) return const tree = treeRef.current if (!tree) return - if (isArtifactTab(activeTabId)) { + if (activeTabId === START_TAB_ID || isArtifactTab(activeTabId)) { requestAnimationFrame(() => { tree.deselectAll() })