Skip to content

Commit fecc65d

Browse files
Fix 404 suggestions for updated semantic search
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
1 parent d8d15d1 commit fecc65d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/utils/not-found-suggestions.server.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { sortNotFoundMatches, type NotFoundMatch } from './not-found-matches.ts'
22
import { notFoundQueryFromPathname } from './not-found-query.ts'
3-
import {
4-
isSemanticSearchConfigured,
5-
semanticSearchKCD,
6-
} from './semantic-search.server.ts'
3+
import { semanticSearchKCD } from './semantic-search.server.ts'
74

85
function requestWantsHtml(request: Request) {
96
// Avoid expensive semantic search for asset/API requests.
@@ -48,7 +45,6 @@ export async function getNotFoundSuggestions({
4845
if (process.env.NODE_ENV === 'test') return null
4946
if (request.method.toUpperCase() !== 'GET') return null
5047
if (!requestWantsHtml(request)) return null
51-
if (!isSemanticSearchConfigured()) return null
5248

5349
const resolvedPathname = normalizePathname(
5450
typeof pathname === 'string' && pathname ? pathname : new URL(request.url).pathname,

0 commit comments

Comments
 (0)