From f18e49432237dd592679af919f6f37b5bb4bc7f3 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 29 Mar 2021 13:37:42 +0300 Subject: [PATCH] Show only the allowed patterns (#30300) * Show only the allowed patterns * remove the early return from __experimentalGetAllowedPatterns * revert block pattern fetched parsed blocks --- packages/block-editor/src/store/selectors.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index d3dcb13a583149..d2288f9fc67cf1 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -1798,7 +1798,6 @@ export const __experimentalGetParsedPattern = createSelector( if ( ! pattern ) { return null; } - return { ...pattern, blocks: parse( pattern.content ), @@ -1818,10 +1817,6 @@ export const __experimentalGetParsedPattern = createSelector( export const __experimentalGetAllowedPatterns = createSelector( ( state, rootClientId = null ) => { const patterns = state.settings.__experimentalBlockPatterns; - if ( ! rootClientId ) { - return patterns; - } - const parsedPatterns = patterns.map( ( { name } ) => __experimentalGetParsedPattern( state, name ) );