From 01bca09349e708c90779e4143296e19cb7ad107f Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 5 Oct 2023 17:38:47 +1300 Subject: [PATCH] switch to map has instead of get --- packages/patterns/src/components/create-pattern-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/patterns/src/components/create-pattern-modal.js b/packages/patterns/src/components/create-pattern-modal.js index 37df7cd876d2d0..3d47e3b17c0730 100644 --- a/packages/patterns/src/components/create-pattern-modal.js +++ b/packages/patterns/src/components/create-pattern-modal.js @@ -61,7 +61,7 @@ export default function CreatePatternModal( { ...corePatternCategories, ].reduce( ( uniqueCategories, category ) => { if ( - ! uniqueCategories.get( category.label ) && + ! uniqueCategories.has( category.label ) && // There are two core categories with `Post` label so explictily remove the one with // the `query` slug to avoid any confusion. category.name !== 'query'