From 75a6e7c74e358a123fe965d7bd2d1b3f4133318b Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Wed, 27 Sep 2023 20:13:58 +1000 Subject: [PATCH] Patterns: Allow non-user patterns under Standard filter (#54756) --- .../src/components/page-patterns/use-patterns.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 1558f4b1e00320..6504b6f59684c6 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -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 ) {