Fix an undefined value when pressing tab with an empty search.
This commit is contained in:
parent
91a7ef89d1
commit
0d0c8e5c43
@ -75,7 +75,7 @@ export default function QuickLaunch({
|
||||
} else if (event.key === "ArrowUp" && currentItemIndex > 0) {
|
||||
setCurrentItemIndex(currentItemIndex - 1);
|
||||
event.preventDefault();
|
||||
} else if (event.key === "Tab" && results[currentItemIndex].type === "searchSuggestion") {
|
||||
} else if (event.key === "Tab" && results[currentItemIndex]?.type === "searchSuggestion") {
|
||||
updateSearch(results[currentItemIndex].name);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user