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 1 commit into from Dec 10, 2019


Copy link

jorgefilipecosta commented Dec 10, 2019


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
Travis CI - Pull Request Build Passed
@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
None yet
2 participants
You can’t perform that action at this time.