diff --git a/src/react/parseKeybindingName.ts b/src/react/parseKeybindingName.ts index 2c41d3f8..46bcf259 100644 --- a/src/react/parseKeybindingName.ts +++ b/src/react/parseKeybindingName.ts @@ -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() + const { keyboard } = (typeof navigator === 'undefined' ? undefined : navigator) ?? {} + const layoutMap = await keyboard?.getLayoutMap?.() ?? new Map() const mapKey = (key: string) => layoutMap.get(key) || key