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

add safety check on scroll method #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpuffer
Copy link
Contributor

@jpuffer jpuffer commented Jun 16, 2014

When Scroller is destroyed right after starting to animate the scroll position, it throws an exception. (TypeError: 'undefined' is not an object (evaluating 'data.horizontal') on line 95) Catch if the data attribute is already gone and don’t try to do anything if that’s the case. Tested and confirmed this will prevent the error.

The diff looks really strange because of a block indent, but the only thing actually modified is scroller.js line 73.

When Scroller is destroyed right after starting to animate the scroll
position, it throws an exception. (TypeError: 'undefined' is not an
object (evaluating 'data.horizontal') on line 95) Catch if the data
attribute is already gone and don’t try to do anything if that’s the
case. Tested and confirmed this will prevent the error.

The diff looks really strange because of a block indent, but the only
thing actually modified is scroller.js line 73.
@jpuffer
Copy link
Contributor Author

jpuffer commented Jul 10, 2014

@benplum Can you take a look at this when you get a chance?

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

Successfully merging this pull request may close these issues.

1 participant