shim-keyboard-event-key icon indicating copy to clipboard operation
shim-keyboard-event-key copied to clipboard

Check if `self` is undefined

Open imedadel opened this issue 4 years ago • 3 comments

Hey Alexey, self might be undefined in some environments, which throws an error.

Your shim is currently used in @reecelucas/react-use-hotkeys, which, when used in Next.js, throws an error when self is undefined.

This PR should fix that.

imedadel avatar Jan 06 '21 10:01 imedadel

Found the same problem using @reecelucas/react-use-hotkeys in gatsby

Please apply the PR

cameronbraid avatar Nov 13 '21 02:11 cameronbraid

I came here because of @reecelucas/react-use-hotkeys in gatsby SSR, as well. This PR is a year and a half old. 🙏🏼

chandlervdw avatar Aug 18 '22 14:08 chandlervdw

@shvaikalesh could we get this merged, please?

chandlervdw avatar Aug 18 '22 14:08 chandlervdw