Skip to content

Commit

Permalink
Improve the way patterns are added to the inserter
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jan 23, 2020
1 parent 6a7ac90 commit 721026e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function BlockTypesList( { items = [], onSelect, onHover = () => {}, children }
}

if ( patterns.length ) {
result.push( ...patterns.map( ( pattern ) => {
result = result.concat( patterns.map( ( pattern ) => {
return {
...item,
id: item.id + pattern.name,
id: `${ item.id }-${ pattern.name }`,
icon: pattern.icon || item.icon,
title: pattern.label || item.title,
description: pattern.description || item.description,
Expand Down

0 comments on commit 721026e

Please sign in to comment.