Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: useColors crash when themes remove the color pallete #18286
The useColors hook did not handle the case where themes disable color palette using:
This PR fixes the issue.
How has this been tested?
I added the following code to the functions.php file of the currently enabled theme (removing the code it contained setting a color palette):
I opened the editor, added a heading block, verified the block did not crash (on master it crashes), verified no preset colors were available.