Skip to content

Commit

Permalink
Fix classic stylebook logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Dec 20, 2024
1 parent 719aaf8 commit 6f7541e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/edit-site/src/components/style-book/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,10 @@ export const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {
],
};

// If the filtered examples are empty, show all examples.
const displayedExamples =
filteredExamples.examples || filteredExamples.subcategories
? filteredExamples
: { examples: examplesForSinglePageUse };
// If there's no preview category, show all examples.
const displayedExamples = previewCategory
? filteredExamples
: { examples: examplesForSinglePageUse };

const { base: baseConfig } = useContext( GlobalStylesContext );
const goTo = getStyleBookNavigationFromPath( section );
Expand Down

0 comments on commit 6f7541e

Please sign in to comment.