Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Destroy glider on unmount #18

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

VStas
Copy link

@VStas VStas commented Feb 12, 2020

Hi! I have an error in my app after ReactGlider is destroyed when I try to resize window:

glider.js:216 Uncaught TypeError: Cannot read property '_func' of null
    at glider.js:216
    at Array.forEach (<anonymous>)
    at _window.Glider.gliderPrototype.bindArrows (glider.js:212)
    at _window.Glider.gliderPrototype.init (glider.js:141)

After unmounting glider continues listenining to window.resize event. To prevent this we need to call destroy() on componentWillUnmount()

@hipstersmoothie hipstersmoothie added the patch create a patch release label Mar 3, 2020
@hipstersmoothie hipstersmoothie merged commit 8e30159 into kevinfarrugia:master Mar 3, 2020
@hipstersmoothie hipstersmoothie added the skip-release do not create a release label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch create a patch release skip-release do not create a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants