fix keyboard shortcut (ctrl + k) with empty categories (#177)

This commit is contained in:
Supavasinan Promdetch 2024-11-11 22:38:52 +07:00 committed by GitHub
parent c229c9cb4a
commit b2e14512b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,6 +40,7 @@ export default function CommandMenu() {
const down = (e: KeyboardEvent) => {
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
e.preventDefault();
fetchSortedCategories();
setOpen((open) => !open);
}
};