fix: fix handling of undefined key in event handler (fehmer) (#5223)

This commit is contained in:
Christian Fehmer 2024-03-13 14:58:28 +01:00 committed by GitHub
parent d249633910
commit 902b32a0b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -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") ||

View file

@ -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 ?? "",