diff --git a/src/client/theme-default/components/VPLocalSearchBox.vue b/src/client/theme-default/components/VPLocalSearchBox.vue index ab180c6b..316df0d0 100644 --- a/src/client/theme-default/components/VPLocalSearchBox.vue +++ b/src/client/theme-default/components/VPLocalSearchBox.vue @@ -158,7 +158,9 @@ debouncedWatch( title = title.replace(reg, `$&`) } if (match.includes('titles')) { - titles = titles.map((t) => t.replace(reg, `$&`)) + titles = titles.flatMap((t) => + t ? [t.replace(reg, `$&`)] : [] + ) } if (showDetailedListValue && match.includes('text')) { text = text.replace(reg, `$&`)