diff --git a/packages/patterns/src/components/duplicate-pattern-modal.js b/packages/patterns/src/components/duplicate-pattern-modal.js index 2b51e82f22da4..70fb0830e0f1c 100644 --- a/packages/patterns/src/components/duplicate-pattern-modal.js +++ b/packages/patterns/src/components/duplicate-pattern-modal.js @@ -17,7 +17,7 @@ function getTermLabels( pattern, categories ) { if ( pattern.type !== PATTERN_TYPES.user ) { return categories.core ?.filter( ( category ) => - pattern.categories.includes( category.name ) + pattern.categories?.includes( category.name ) ) .map( ( category ) => category.label ); }