Skip to content

Commit 75a6e7c

Browse files
aaronrobertshawmikachan
authored andcommitted
Patterns: Allow non-user patterns under Standard filter (#54756)
1 parent be780bd commit 75a6e7c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/edit-site/src/components/page-patterns/use-patterns.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,13 @@ const selectPatterns = createSelector(
155155
];
156156

157157
if ( syncStatus ) {
158-
patterns = patterns.filter(
159-
( pattern ) => pattern.syncStatus === syncStatus
160-
);
158+
// User patterns can have their sync statuses checked directly
159+
// Non-user patterns are all unsynced for the time being.
160+
patterns = patterns.filter( ( pattern ) => {
161+
return pattern.id
162+
? pattern.syncStatus === syncStatus
163+
: syncStatus === PATTERN_SYNC_TYPES.unsynced;
164+
} );
161165
}
162166

163167
if ( categoryId ) {

0 commit comments

Comments
 (0)