Skip to content

Commit

Permalink
Blocks without examples should show all blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Dec 20, 2024
1 parent 6f7541e commit 81b2e37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/edit-site/src/components/style-book/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@ export const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {
previewCategory = 'blocks';
const blockName =
decodeURIComponent( section ).split( '/blocks/' )[ 1 ];
if ( blockName ) {
if (
blockName &&
examples.find( ( example ) => example.name === blockName )
) {
previewCategory = blockName;
}
} else if ( ! isStatic ) {
Expand Down

0 comments on commit 81b2e37

Please sign in to comment.