From e17c1bd05f3b4f205ac43418d6cda0bff7968de2 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Sat, 23 Sep 2023 17:29:59 +1000 Subject: [PATCH] Patterns: Allow non-user patterns under Standard filter --- .../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 ) {