gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.75k stars 524 forks source link

Uncaught TypeError: Cannot read property 'handleKeyDown' of undefined #461

Closed zeniroy closed 5 years ago

zeniroy commented 5 years ago

🐛 Bug Report

When i added Joyride component and unmounted that without opening, I got

Uncaught TypeError: Cannot read property 'handleKeyDown' of undefined

There must be simple check in removeScope function.

error.

To Reproduce

Just add Joyride component and unmount without opening.

Expected behavior

Must be no errors

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/84j9qyw8j8

Run npx envinfo --system --binaries --npmPackages react-floater

Paste the results here:

  System:
    OS: macOS 10.14.2
    CPU: (4) x64 Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
    Memory: 153.38 MB / 8.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 9.3.0 - /usr/local/bin/node
    Yarn: 1.3.2 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.7.0 - /usr/local/bin/watchman
gilbarbara commented 5 years ago

I already caught that, thanks! It will be fixed in 2.0.2