Skip to content

Commit

Permalink
switch to map has instead of get
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Oct 5, 2023
1 parent 18c49a4 commit 01bca09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/patterns/src/components/create-pattern-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 01bca09

Please sign in to comment.