From 7587d1763553db0e298841f411ca590631ed348a Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 4 Jan 2021 16:09:53 +0200 Subject: [PATCH] Fix editor crash when registering a block pattern without `categories` (#27970) --- .../block-editor/src/components/inserter/block-patterns-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/inserter/block-patterns-tab.js b/packages/block-editor/src/components/inserter/block-patterns-tab.js index ceb9a76a7cfb1f..1c44cf50532a4b 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-tab.js +++ b/packages/block-editor/src/components/inserter/block-patterns-tab.js @@ -59,7 +59,7 @@ function BlockPatternsCategory( { () => allCategories.filter( ( category ) => allPatterns.some( ( pattern ) => - pattern.categories.includes( category.name ) + pattern.categories?.includes( category.name ) ) ), [ allPatterns, allCategories ]