From c57bd08b83ade1871eb83ef35cd4c5395caa20ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 9 Aug 2025 19:12:57 +0200 Subject: [PATCH] Fix missing react dependency on hook --- packages/gitbook/src/components/Search/SearchResults.tsx | 2 +- packages/gitbook/src/components/Search/server-actions.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gitbook/src/components/Search/SearchResults.tsx b/packages/gitbook/src/components/Search/SearchResults.tsx index ec0031c7f5..c764192b99 100644 --- a/packages/gitbook/src/components/Search/SearchResults.tsx +++ b/packages/gitbook/src/components/Search/SearchResults.tsx @@ -156,7 +156,7 @@ export const SearchResults = React.forwardRef(function SearchResults( cancelled = true; clearTimeout(timeout); }; - }, [query, global, withAI, trackEvent]); + }, [query, global, withAI, trackEvent, spaceId]); const results: ResultType[] = React.useMemo(() => { if (!withAI) { diff --git a/packages/gitbook/src/components/Search/server-actions.tsx b/packages/gitbook/src/components/Search/server-actions.tsx index 708b799ae2..4c10c16ee1 100644 --- a/packages/gitbook/src/components/Search/server-actions.tsx +++ b/packages/gitbook/src/components/Search/server-actions.tsx @@ -194,7 +194,7 @@ export async function streamAskQuestion({ * Stream a list of suggested questions for the site. * Optionally scoped to a specific space. */ -export async function streamRecommendedQuestions(spaceId?: string) { +export async function streamRecommendedQuestions(spaceId: string) { return traceErrorOnly('Search.streamRecommendedQuestions', async () => { const siteURLData = await getSiteURLDataFromMiddleware(); const context = await getServerActionBaseContext();