diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js index a9cedd0d211e5..fb6be8c7fa2f9 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js @@ -40,7 +40,7 @@ export default function usePatternDetails( postType, postId ) { select( coreStore ); const userPatternCategories = getUserPatternCategories(); const categories = new Map(); - userPatternCategories?.forEach( ( userCategory ) => + userPatternCategories.forEach( ( userCategory ) => categories.set( userCategory.id, userCategory ) );