keybinds: Fix invalid return

Mousetrap doesn't take an async function.
It either accepts False (stop key propagation) or any other
value (bubble up the event)
This commit is contained in:
Reto Brunner 2022-11-16 06:50:56 +01:00
parent 7ee4b80a6e
commit 0765d209f2

View file

@ -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;
});