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: useColors crashes on storybook #19046

Merged
merged 1 commit into from Dec 10, 2019

Conversation

@jorgefilipecosta
Copy link
Member

jorgefilipecosta commented Dec 10, 2019

Description

We were verifying if a parent node exists to use a background color, but we were not verifying the node type and getComputedStyle can not be used with some node types (e.g: document).
Currently adding paragraphs or headings on the storybook playground is impossible, this PR fixes the issue by adding a simple check.

How has this been tested?

I executed npm run storybook:dev.
I opened the playground and verified I could add paragraphs and headings.

@jorgefilipecosta jorgefilipecosta merged commit 14be12b into master Dec 10, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@jorgefilipecosta jorgefilipecosta deleted the fix/useColors-crashes-on-storybook branch Dec 10, 2019
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
@ellatrix ellatrix mentioned this pull request Jan 8, 2020
0 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.