Skip to content

Conversation

@jorgefilipecosta
Copy link
Member

Fixes an issue found by @jasmussen, where when there is only a single page available on the all-pages view. Moving the page to the trash crashes the application.

Testing Instructions

Go to the site editor -> pages.
On the all pages view move all the pages to the trash so there is only a single page left.
Now move that single page to the trash and verify everything worked well on trunk a crash happens.

@jorgefilipecosta jorgefilipecosta added the [Type] Bug An existing feature does not function as intended label Sep 11, 2024
@github-actions
Copy link

github-actions bot commented Sep 11, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jorgefilipecosta <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: jasmussen <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@jasmussen
Copy link
Contributor

Nice, thanks for working on this.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thank you, @jorgefilipecosta!

The fix works as expected, and it makes sense to add this check.

@jorgefilipecosta jorgefilipecosta merged commit 8a7df39 into trunk Sep 11, 2024
@jorgefilipecosta jorgefilipecosta deleted the fix/moving-the-last-page-item-to-the-trash-causes-a-crash branch September 11, 2024 18:13
@github-actions github-actions bot added this to the Gutenberg 19.3 milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants