Skip to content

Commit

Permalink
fix(useMagicKeys): getModifierState is not function error in Chrome (
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSuisse committed Jun 2, 2022
1 parent 530e3a5 commit d79e090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useMagicKeys/index.ts
Expand Up @@ -121,7 +121,7 @@ export function useMagicKeys(options: UseMagicKeysOptions<boolean> = {}): any {
})
metaDeps.clear()
}
else if (e.getModifierState('Meta') && value) {
else if (typeof e.getModifierState === 'function' && e.getModifierState('Meta') && value) {
[...current, ...values].forEach(key => metaDeps.add(key))
}
}
Expand Down

0 comments on commit d79e090

Please sign in to comment.