Fix an undefined value when pressing tab with an empty search.

pull/2868/head
Flo2410 4 months ago
parent 91a7ef89d1
commit 0d0c8e5c43
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F

@ -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…
Cancel
Save