Skip to content

Check if getBlock( end ) is valid#19239

Merged
geriux merged 7 commits intomasterfrom
rnmobile/fix-undo-crash
Dec 26, 2019
Merged

Check if getBlock( end ) is valid#19239
geriux merged 7 commits intomasterfrom
rnmobile/fix-undo-crash

Conversation

@lukewalczak
Copy link
Copy Markdown
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
Copy Markdown
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