From 19c91c837a653bde5cb0e611065417a098c8751d Mon Sep 17 00:00:00 2001 From: Robin Andeer Date: Mon, 17 Jul 2023 13:32:25 +0200 Subject: [PATCH] Catch errors in debug dialog shortcut effect --- apps/store/src/components/DebugDialog/DebugDialog.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/store/src/components/DebugDialog/DebugDialog.tsx b/apps/store/src/components/DebugDialog/DebugDialog.tsx index 9859f5f254..49e3df758b 100644 --- a/apps/store/src/components/DebugDialog/DebugDialog.tsx +++ b/apps/store/src/components/DebugDialog/DebugDialog.tsx @@ -10,8 +10,7 @@ export const DebugDialog = (props: { children: ReactNode }) => { useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - const ctrl = event.getModifierState('Control') - if (ctrl && event.key === 'd') { + if (event.ctrlKey && event.key === 'd') { datadogRum.addAction('open debug-dialog') setOpen(true) }