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

CustomSelectControl: Provide fallback describedBy when there's no selected item #34348

Closed
Mamaduka opened this issue Aug 27, 2021 · 0 comments · Fixed by #34385
Closed

CustomSelectControl: Provide fallback describedBy when there's no selected item #34348

Mamaduka opened this issue Aug 27, 2021 · 0 comments · Fixed by #34385
Labels
[Package] Block editor /packages/block-editor [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@Mamaduka
Copy link
Member

Mamaduka commented Aug 27, 2021

Description

Currently if CustomSelectControl value is undefined component will trigger an error. The component tries to generate the describedBy value using the selected option's name. We should provide fallback value when there's no selection.

A similar change should be made for the FontAppearanceControl component as well.

Step-by-step reproduction instructions

  1. Install and activate Quadrat theme.
  2. Go the the "Site Editor."
  3. The editor crashes and displays an error message.

Screenshots, screen recording, code snippet

CleanShot 2021-08-27 at 13 33 34

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components [Package] Block editor /packages/block-editor labels Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant