File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
packages/blocks/src/components Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -69,17 +69,19 @@ export function WordPressBlocksProvider(props: {
6969 * ```
7070 */
7171export function useBlocksTheme ( ) : BlocksTheme {
72-
7372 // If it's an empty object, the provider hasn't been initialized.±
74- if ( typeof WordPressBlocksContext === 'undefined' || typeof WordPressBlocksContext === 'undefined' ) {
75- throw new Error (
73+ if (
74+ typeof WordPressBlocksContext === 'undefined' ||
75+ typeof WordPressBlocksContext === 'undefined'
76+ ) {
77+ throw new Error (
7678 'useBlocksTheme hook was called outside of context, make sure your app is wrapped with WordPressBlocksProvider' ,
7779 ) ;
78- }
80+ }
7981
8082 const themeContext = React . useContext ( WordPressThemeContext ) ;
81- if ( typeof themeContext === 'undefined' ) {
82- throw new Error (
83+ if ( typeof themeContext === 'undefined' ) {
84+ throw new Error (
8385 'useBlocksTheme hook was called outside of context, make sure your app is wrapped with WordPressBlocksProvider' ,
8486 ) ;
8587 }
You can’t perform that action at this time.
0 commit comments