Skip to content

Commit 293ef85

Browse files
authored
fix(search): Don't crash the page if a starts a search with the letter "H" (#1351)
1 parent aa40555 commit 293ef85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/search.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => {
3131
// don't all appear the same in the search results
3232
const variant = getNav.getVariant(getNav.getVariantRoot(item.path), item.path)
3333
const hierarchy = getNav.getItemBreadcrumbs(item.path)
34-
if (!variant || variant !== hierarchy[hierarchy.length - 1].shortName) {
34+
if (!variant || variant !== hierarchy[hierarchy.length - 1]?.shortName) {
3535
hierarchy.pop()
3636
}
3737

0 commit comments

Comments
 (0)