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

FocalPointPicker: Check if value is NaN #33637

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

walbo
Copy link
Member

@walbo walbo commented Jul 23, 2021

Description

Check if parsed value from UnitControl is NaN before setting axis values. This fixes a bug where the block crashes when deleting the value.

Fixes #33617

How has this been tested?

Locally by following the steps in the issue.

Screenshots

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • 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 (please manually search all *.native.js files for terms that need renaming or removal).

@walbo walbo changed the title FocalPointPicker: Check if value is nan FocalPointPicker: Check if value is NaN Jul 23, 2021
Copy link
Contributor

@stokesman stokesman left a comment

Choose a reason for hiding this comment

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

Nicely done. I tested with Gutenberg.run and it works like it should.

@Mamaduka Mamaduka merged commit cf5a2a6 into WordPress:trunk Jul 23, 2021
@github-actions github-actions bot added this to the Gutenberg 11.2 milestone Jul 23, 2021
@walbo walbo deleted the fix/focal-point-picker-nan branch July 23, 2021 09:38
@talldan talldan added [Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended labels Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting Focal Point Value Setting Crashes Block
4 participants