Commit bdb7d7f
authored
Bug: Fixing null/undefined theme argument for the WordPressBlocksProvider (#2013)
* Fixes #1986 and allows for the theme argument to be null for the WordPressBlocksProvider
* Fixed typo
* Fixing lint issue if theme context is undefined.
* Fixed conditions to allow null for the theme argument
* Fixed logic
* Fixed lint issues
* Fixed typo after running eslint and it changed WordPressThemeContext
* Returning theme context as this isn't required by the WordPressBlockProvider
* Set return type as BlocksTheme
* Removed test assertion to check if theme is undefined
* Updating to use a default value for theme instead in order to prevent an undefined themeContext error to be thrown for useBlocksTheme function
* Removed testing code
* Reverted test deletion.
* Addec changeset1 parent adf5a6d commit bdb7d7f
File tree
2 files changed
+6
-1
lines changed- .changeset
- packages/blocks/src/components
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments