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

Destroy during resize throws an error #352

Open
whiteand opened this issue Oct 7, 2021 · 0 comments
Open

Destroy during resize throws an error #352

whiteand opened this issue Oct 7, 2021 · 0 comments

Comments

@whiteand
Copy link

whiteand commented Oct 7, 2021

Hello 👋

Steps To Reproduce
I destroy locomotive scroll instance during resize and it causes _resize function to be called after destroy method.
And it throws an error.

Expected behavior
After destroy nothing fails

I've fixed this bug by cancelling requested animation frames in destroy method

#337

Can you please check my MR and apply it, if it's something that should be done.

Thank you 👊

@whiteand whiteand changed the title When I destroy locomotive scroll application fails because of _resize function called from requested frame Destroy during resize throws an error Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant