mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 21:51:29 +08:00
fix: fix handling of undefined key in event handler (fehmer) (#5223)
This commit is contained in:
parent
d249633910
commit
902b32a0b4
2 changed files with 2 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import { getCommandline } from "../utils/async-modules";
|
|||
|
||||
document.addEventListener("keydown", async (e) => {
|
||||
if (PageTransition.get()) return;
|
||||
if (e.key === undefined) return;
|
||||
|
||||
if (
|
||||
(e.key === "Escape" && Config.quickRestart !== "esc") ||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ window.onunhandledrejection = function (e): void {
|
|||
customTitle: "DEV: Unhandled rejection",
|
||||
duration: 5,
|
||||
});
|
||||
console.error(e);
|
||||
}
|
||||
void log("error", {
|
||||
error: e.reason.stack ?? "",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue