Skip to content

Commit

Permalink
fix ci (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored Nov 20, 2024
1 parent c441792 commit f2552e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/react/parseKeybindingName.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export async function parseBindingName (binding: string) {
if (!binding) return ''

const { keyboard } = navigator
const layoutMap = (typeof keyboard === 'undefined' ? undefined : await keyboard?.getLayoutMap?.()) ?? new Map<string, string>()
const { keyboard } = (typeof navigator === 'undefined' ? undefined : navigator) ?? {}
const layoutMap = await keyboard?.getLayoutMap?.() ?? new Map<string, string>()

const mapKey = (key: string) => layoutMap.get(key) || key

Expand Down

0 comments on commit f2552e7

Please sign in to comment.