Skip to content

Commit

Permalink
Merge pull request #26 from behlole/master
Browse files Browse the repository at this point in the history
Added a fixed on navigator,
  • Loading branch information
amcdnl committed May 15, 2023
2 parents a9f72e5 + fa76718 commit f740e4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
export const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
let isMac: boolean = false;
try {
if (navigator) isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
} catch (e) {
}
export const MODIFIER_KEY = isMac ? '⌘' : 'CTRL';

export function getHotkeyText(hotkey: string) {
Expand Down

0 comments on commit f740e4e

Please sign in to comment.