Skip to content

Commit

Permalink
Add empty string fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Cbodfield committed May 6, 2024
1 parent 45dbff3 commit 64e1892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function localizeMod(hotkey: string, platform?: string | undefined): string {
const ssrSafeWindow = typeof window === "undefined" ? undefined : window
const safePlatform = ssrSafeWindow
? ssrSafeWindow.navigator.platform
: platform
: (platform ?? "")

const localModifier = matchApplePlatform.test(platform) ? 'Meta' : 'Control'
return hotkey.replace('Mod', localModifier)
Expand Down

0 comments on commit 64e1892

Please sign in to comment.