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
2 people authored and tsanislavgatev committed Feb 20, 2024
1 parent c7835c2 commit 3f9e4c4
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 3f9e4c4

Please sign in to comment.