Skip to content

Commit ccfbd3c

Browse files
authored
Fix AI Search Query (#3510)
1 parent 5c49235 commit ccfbd3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/gitbook/src/components/Search/SearchContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export function SearchContainer(props: SearchContainerProps) {
128128

129129
// We trim the query to avoid invalidating the search when the user is typing between words.
130130
const normalizedQuery = state?.query?.trim() ?? '';
131+
const normalizedAsk = state?.ask?.trim() ?? '';
131132

132133
return (
133134
<SearchAskProvider value={searchAsk}>
@@ -147,7 +148,7 @@ export function SearchContainer(props: SearchContainerProps) {
147148
aiMode={aiMode}
148149
/>
149150
) : null}
150-
{state?.ask ? <SearchAskAnswer query={normalizedQuery} /> : null}
151+
{normalizedAsk ? <SearchAskAnswer query={normalizedAsk} /> : null}
151152
</React.Suspense>
152153
) : null
153154
}

0 commit comments

Comments
 (0)