Skip to content

Commit

Permalink
guard userAgentData access (#2960)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored Jul 16, 2024
1 parent b146dcc commit 132e3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/common/KeyboardShortcuts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
export let is_mac_keyboard = /Mac/i.test(navigator.userAgentData.platform ?? navigator.platform)
export let is_mac_keyboard = /Mac/i.test(navigator.userAgentData?.platform ?? navigator.platform)

export let control_name = is_mac_keyboard ? "⌃" : "Ctrl"
export let ctrl_or_cmd_name = is_mac_keyboard ? "⌘" : "Ctrl"
Expand Down

0 comments on commit 132e3b3

Please sign in to comment.