Skip to content

Commit

Permalink
Patterns: Allow non-user patterns under Standard filter (#54756)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw authored and mikachan committed Sep 27, 2023
1 parent be780bd commit 75a6e7c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/edit-site/src/components/page-patterns/use-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,13 @@ const selectPatterns = createSelector(
];

if ( syncStatus ) {
patterns = patterns.filter(
( pattern ) => pattern.syncStatus === syncStatus
);
// User patterns can have their sync statuses checked directly
// Non-user patterns are all unsynced for the time being.
patterns = patterns.filter( ( pattern ) => {
return pattern.id
? pattern.syncStatus === syncStatus
: syncStatus === PATTERN_SYNC_TYPES.unsynced;
} );
}

if ( categoryId ) {
Expand Down

0 comments on commit 75a6e7c

Please sign in to comment.