diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 6ccb1c1bbfcb6f..ed0ae14bcd2490 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -2301,7 +2301,7 @@ export const __experimentalUserPatternCategories = createSelector( export const __experimentalGetParsedPattern = createSelector( ( state, patternName ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = state.settings.__experimentalUserPatterns; + const userPatterns = state.settings.__experimentalUserPatterns || []; const pattern = [ ...patterns, ...userPatterns ].find( ( { name } ) => name === patternName @@ -2321,7 +2321,6 @@ export const __experimentalGetParsedPattern = createSelector( }, ( state ) => [ state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, state?.settings?.__experimentalUserPatternCategories, state?.settings?.__experimentalUserPatterns, ] @@ -2330,7 +2329,7 @@ export const __experimentalGetParsedPattern = createSelector( const getAllAllowedPatterns = createSelector( ( state ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = state.settings.__experimentalUserPatterns; + const userPatterns = state.settings.__experimentalUserPatterns || []; const { allowedBlockTypes } = getSettings( state ); diff --git a/packages/core-data/src/selectors.ts b/packages/core-data/src/selectors.ts index b0f8f780437f3e..f1532a024953ff 100644 --- a/packages/core-data/src/selectors.ts +++ b/packages/core-data/src/selectors.ts @@ -1362,7 +1362,7 @@ export const getUserPatterns = createSelector( id: patternBlock.id, name: `core/block/${ patternBlock.id }`, slug: patternBlock.slug, - syncStatus: patternBlock.wp_pattern_sync_status, + syncStatus: patternBlock.wp_pattern_sync_status || 'fully', title: patternBlock.title.raw, type: 'wp_block', patternBlock,