Skip to content

[BUG] Global hotkeys throwing errors after dom changes #150

@hadihallak

Description

@hadihallak

Describe the bug
When using the GlobalHotKeys component it gives errors after some components mount and unmount.
using any keys seems to give the following error even though the hotkeys are still working and actions are triggering as usual:
image

How are you using react hotkeys components? (HotKeys, GlobalHotKeys, IgnoreKeys etc)
GlobalHotKeys


Expected behavior
it should not error out.

Platform (please complete the following information):

  • Version of react-hotkeys v2 prerelease 4
  • Browser chrome
  • OS: [windows, macos]

Are you willing and able to create a PR request to fix this issue?
I did a quick dive and by adding || [] at the end of this line, simply solves the issue in our usecase. not sure if this fix is right or if any deeper changes are needed

APPLICABLE TO v2.0.0-pre1 AND ABOVE: ======================

Include the smallest log that includes your issue:

Types seem to be broken so I couldn't import the configure function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions