Skip to content

Commit

Permalink
keybinds: Fix invalid return
Browse files Browse the repository at this point in the history
Mousetrap doesn't take an async function.
It either accepts False (stop key propagation) or any other
value (bubble up the event)
  • Loading branch information
brunnre8 committed Nov 16, 2022
1 parent 7ee4b80 commit 0765d20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/js/keybinds.ts
Expand Up @@ -113,13 +113,13 @@ Mousetrap.bind(["alt+a"], function (e) {
});

// Show the help menu.
Mousetrap.bind(["alt+/"], async function (e) {
Mousetrap.bind(["alt+/"], function (e) {
if (isIgnoredKeybind(e)) {
return true;
}

await navigate("Help");

/* eslint-disable no-console */
navigate("Help").catch((err) => console.log(err));
return false;
});

Expand Down

0 comments on commit 0765d20

Please sign in to comment.