Skip to content

Commit 0765d20

Browse files
committedNov 16, 2022
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)
1 parent 7ee4b80 commit 0765d20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎client/js/keybinds.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ Mousetrap.bind(["alt+a"], function (e) {
113113
});
114114

115115
// Show the help menu.
116-
Mousetrap.bind(["alt+/"], async function (e) {
116+
Mousetrap.bind(["alt+/"], function (e) {
117117
if (isIgnoredKeybind(e)) {
118118
return true;
119119
}
120120

121-
await navigate("Help");
122-
121+
/* eslint-disable no-console */
122+
navigate("Help").catch((err) => console.log(err));
123123
return false;
124124
});
125125

0 commit comments

Comments
 (0)
Please sign in to comment.