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 if getBlock( end ) is valid #19239

Merged
merged 7 commits into from
Dec 26, 2019
Merged

Check if getBlock( end ) is valid #19239

merged 7 commits into from
Dec 26, 2019

Conversation

lukewalczak
Copy link
Member

@lukewalczak lukewalczak commented Dec 19, 2019

Description

Fixes: wordpress-mobile/gutenberg-mobile#1699

Check if getBlock( end ) is valid, otherwise null is passed.
Ref to gb-mobile repo: wordpress-mobile/gutenberg-mobile#1701

How has this been tested?

  1. Open mobile app
  2. Add a block
  3. Press undo button
  4. Add a new block - if app not crashing everything is good 👍

Screenshots

before after

Types of changes

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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@lukewalczak lukewalczak 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 Dec 19, 2019
@lukewalczak lukewalczak self-assigned this Dec 19, 2019
@geriux geriux self-requested a review December 19, 2019 13:56
Copy link
Member

@geriux geriux left a comment

Choose a reason for hiding this comment

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

Thanks for this fix! Works great, tested in the demo app and both WP-iOS and WP-Android.

@geriux geriux merged commit 296f94c into master Dec 26, 2019
@geriux geriux deleted the rnmobile/fix-undo-crash branch December 26, 2019 13:53
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
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.

App crash after block removal due to undo button pressing
3 participants