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

Fix: Use Colors crashes if contrast checkers are not specified #18884


Copy link

jorgefilipecosta commented Dec 3, 2019


Currently, useColors hook crashes in situations where contrast checking is not enabled.
This is making the navigation block crash right after being inserter and populated with menu items.
This PR adds a check to fix this issue.

How has this been tested?

I added the navigation block.
I inserted menu items from top-level pages.
I verified the block does not crashes.
I tried to use the heading block normally, and it still worked as expected.

Copy link

draganescu left a comment

This fixes the navigation block, tested and works OK.

@jorgefilipecosta jorgefilipecosta merged commit e1b70f0 into master Dec 3, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
@jorgefilipecosta jorgefilipecosta deleted the fix/useColors-crash-if-contrastCheckers-are-not-specified branch Dec 3, 2019
@youknowriad youknowriad added this to the Gutenberg 7.1 milestone Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.