Skip to content

Commit 65b6d30

Browse files
committed
fix: add missing expression in search, fix empty results output
1 parent f3e2fe6 commit 65b6d30

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/composables/npm/useSearch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ export function useSearch(
289289

290290
// Seed cache from asyncData for Algolia (which skips cache on initial fetch)
291291
if (!cache.value && asyncData.data.value) {
292+
const { searchResponse } = asyncData.data.value
292293
setCache([...searchResponse.objects], searchResponse.totalUnlimited)
293294
}
294295

app/pages/search.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ const rawLiveRegionMessage = computed(() => {
630630
}
631631
632632
if (status.value === 'success' || status.value === 'error') {
633-
if (displayResults.value.length === 0 && query.value) {
634-
return $t('search.no_results', { query: query.value })
633+
if (displayResults.value.length === 0 && committedQuery.value) {
634+
return $t('search.no_results', { query: committedQuery.value })
635635
}
636636
}
637637

0 commit comments

Comments
 (0)