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

Check that scrollViewRef is still available before trying to scroll #17899

Merged
merged 2 commits into from
Oct 11, 2019

Conversation

koke
Copy link
Contributor

@koke koke commented Oct 11, 2019

This was meant to fix wordpress-mobile/gutenberg-mobile#1390 although I can't reproduce the issue anymore.

In any case, it's a good safety check. Since this happens in a delayed fashion, there scrollView might not exist anymore by the time this runs, so it's better to check that it's still there before trying to scroll.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@koke koke added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Oct 11, 2019
@koke koke requested a review from pinarol October 11, 2019 09:35
@koke koke force-pushed the issue/fix-scrollViewRef-crash branch from d323c9a to 72e795e Compare October 11, 2019 10:53
Copy link
Contributor

@pinarol pinarol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 Tested as described in wordpress-mobile/gutenberg-mobile#1438 (review)

@koke koke merged commit e5a00cf into master Oct 11, 2019
@koke koke deleted the issue/fix-scrollViewRef-crash branch October 11, 2019 13:44
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: null is not an object (evaluating '_this.scrollViewRef.props)
3 participants