Skip to content

Commit

Permalink
fix(ui5-toast): check whether the event key property exists (#8209)
Browse files Browse the repository at this point in the history
Co-authored-by: Nia Peeva <niya.peeva@sap.com>
  • Loading branch information
niyap and Nia Peeva authored Feb 1, 2024
1 parent c1e2404 commit 43d32f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/Toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let opener: HTMLElement | null;
let globalListenerAdded = false;
const handleGlobalKeydown = (e: KeyboardEvent) => {
const isCtrl = e.metaKey || (!isMac() && e.ctrlKey);
const isMKey = e.key.toLowerCase() === "m";
const isMKey = e.key && e.key.toLowerCase() === "m";
const isCombinationPressed = isCtrl && e.shiftKey && isMKey;
const hasOpenToast = openedToasts.length;

Expand Down

0 comments on commit 43d32f0

Please sign in to comment.