From a1a527902b041eb0debcbc83ab8c11d7ea8304d0 Mon Sep 17 00:00:00 2001 From: yyh Date: Thu, 26 Mar 2026 16:10:58 +0800 Subject: [PATCH] refactor: remove redundant skill file sync ref guard --- web/app/components/workflow/skill/main.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/app/components/workflow/skill/main.tsx b/web/app/components/workflow/skill/main.tsx index 3b2438def0..4760817ff4 100644 --- a/web/app/components/workflow/skill/main.tsx +++ b/web/app/components/workflow/skill/main.tsx @@ -35,12 +35,10 @@ const SkillMain = () => { const appId = appDetail?.id || '' const [queryFileId] = useQueryState('fileId', parseAsString) const storeApi = useWorkflowStore() - const openedFileRef = React.useRef(null) React.useEffect(() => { - if (!queryFileId || openedFileRef.current === queryFileId) + if (!queryFileId) return - openedFileRef.current = queryFileId storeApi.getState().openTab(queryFileId, { pinned: true }) }, [queryFileId, storeApi])