Skip to content

Commit a396d39

Browse files
committed
docs: hydration issue in full-text-search page
1 parent 33d10c9 commit a396d39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/app/components/example/ExampleFulltextFusejs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Fuse from 'fuse.js'
44
const query = ref('')
55
const { data } = await useAsyncData('search-data', () => queryCollectionSearchSections('docs'))
66
7-
const fuse = new Fuse(data.value, {
7+
const fuse = new Fuse(data.value || [], {
88
keys: [
99
'title',
1010
'description',

docs/app/components/example/ExampleFulltextMiniSearch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const miniSearch = new MiniSearch({
1414
})
1515
1616
// Add data to the MiniSearch instance
17-
miniSearch.addAll(toValue(data.value))
17+
miniSearch.addAll(toValue(data.value || []))
1818
const result = computed(() => miniSearch.search(toValue(query)).slice(0, 10))
1919
</script>
2020

0 commit comments

Comments
 (0)