From 59fa77fe18c98bf73dac06071d875668242ec377 Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 30 Aug 2022 15:12:06 +0200 Subject: [PATCH] using optional chaining --- frontend/src/ts/elements/commandline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/elements/commandline.ts b/frontend/src/ts/elements/commandline.ts index a72f0bc3a..84c6a0319 100644 --- a/frontend/src/ts/elements/commandline.ts +++ b/frontend/src/ts/elements/commandline.ts @@ -392,7 +392,7 @@ $(document).ready(() => { // opens command line if escape or ctrl/cmd + shift + p if ( ((event.key === "Escape" && Config.quickRestart !== "esc") || - (event.key.toLowerCase() === "p" && + (event.key?.toLowerCase() === "p" && (event.metaKey || event.ctrlKey) && event.shiftKey) || (event.key === "Tab" && Config.quickRestart === "esc")) &&