Skip to content

Commit

Permalink
Fix dependency and put user patterns at top of list
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Sep 3, 2023
1 parent e1c31ff commit d2a48ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2342,6 +2342,7 @@ export const __experimentalGetParsedPattern = createSelector(
( state ) => [
state.settings.__experimentalBlockPatterns,
state.settings.__experimentalReusableBlocks,
state?.settings?.__experimentalUserPatternCategories,
]
);

Expand All @@ -2352,7 +2353,7 @@ const getAllAllowedPatterns = createSelector(

const { allowedBlockTypes } = getSettings( state );

const parsedPatterns = [ ...patterns, ...unsyncedPatterns ]
const parsedPatterns = [ ...unsyncedPatterns, ...patterns ]
.filter( ( { inserter = true } ) => !! inserter )
.map( ( { name } ) =>
__experimentalGetParsedPattern( state, name )
Expand All @@ -2366,6 +2367,7 @@ const getAllAllowedPatterns = createSelector(
state.settings.__experimentalBlockPatterns,
state.settings.__experimentalReusableBlocks,
state.settings.allowedBlockTypes,
state?.settings?.__experimentalUserPatternCategories,
]
);

Expand Down

0 comments on commit d2a48ce

Please sign in to comment.