From 0765d209f2ce204e2a3e86c56a7c2108a0487a6f Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Wed, 16 Nov 2022 06:50:56 +0100 Subject: [PATCH] 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) --- client/js/keybinds.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/js/keybinds.ts b/client/js/keybinds.ts index c4736772..88ec48f7 100644 --- a/client/js/keybinds.ts +++ b/client/js/keybinds.ts @@ -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; });