Skip to content

Commit

Permalink
Update user created patterns based of new meta wp_block property
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jun 2, 2023
1 parent e7433da commit f7f2f2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/library/use-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const useBlockPatternsByCategory = ( category, postType = PATTERNS ) => {

const reusableBlockToPattern = ( reusableBlock ) => ( {
blocks: parse( reusableBlock.content.raw ),
categories: reusableBlock.meta?.wp_block_categories,
categories: reusableBlock.meta?.wp_block?.categories,
name: reusableBlock.slug,
title: reusableBlock.title.raw,
type: reusableBlock.type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const useUserPatterns = () => {
} );

return nonSyncedPatterns?.map( ( item ) => ( {
categories: item.meta?.wp_block_categories,
categories: item.meta?.wp_block?.categories,
name: item.slug,
} ) );
}, [] );
Expand Down

0 comments on commit f7f2f2b

Please sign in to comment.