diff --git a/.changeset/afraid-terms-shake.md b/.changeset/afraid-terms-shake.md new file mode 100644 index 000000000..9e79e4b84 --- /dev/null +++ b/.changeset/afraid-terms-shake.md @@ -0,0 +1,5 @@ +--- +"@faustwp/blocks": patch +--- + +Bug: Fixed an issue an issue with WordPressBlocksProvider and the theme argument to allow it to be optional and not throw an error. By default theme is now an empty object diff --git a/packages/blocks/src/components/WordPressBlocksProvider.tsx b/packages/blocks/src/components/WordPressBlocksProvider.tsx index 44c869c31..84546a9f6 100644 --- a/packages/blocks/src/components/WordPressBlocksProvider.tsx +++ b/packages/blocks/src/components/WordPressBlocksProvider.tsx @@ -48,7 +48,7 @@ export function WordPressBlocksProvider(props: { config: WordPressBlocksProviderConfig; }) { const { children, config } = props; - const { blocks, theme } = config; + const { blocks, theme = {} } = config; return (