diff --git a/ee/tabby-ui/app/search/components/search.tsx b/ee/tabby-ui/app/search/components/search.tsx index 5c65abf69ed8..651a83ffae21 100644 --- a/ee/tabby-ui/app/search/components/search.tsx +++ b/ee/tabby-ui/app/search/components/search.tsx @@ -255,11 +255,11 @@ export function Search() { }, [threadMessages]) const isThreadOwner = useMemo(() => { - if (!threadId) return true + if (!meData) return false + if (!threadIdFromURL) return true - if (!meData || !threadData?.threads?.edges?.length) return false - return meData.me.id === threadData.threads.edges[0].node.userId - }, [meData, threadData, threadId]) + return meData.me.id === threadData?.threads.edges[0].node.userId + }, [meData, threadData, threadIdFromURL]) // Compute title const sources = contextInfoData?.contextInfo.sources