Skip to content

Commit

Permalink
Inserter: Fix React warning when saving reusable blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 8, 2017
1 parent e4707b9 commit abfecc3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/components/inserter/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ export default class InserterGroup extends Component {
const { current } = this.state;
const { selectBlock, bindReferenceNode } = this.props;
const { disabled } = block;

return (
<button
role="menuitem"
key={ block.name }
key={ block.name === 'core/block' && block.initialAttributes ?
block.name + block.initialAttributes.ref :
block.name
}
className="editor-inserter__block"
onClick={ selectBlock( block ) }
ref={ bindReferenceNode( block.name ) }
Expand Down

0 comments on commit abfecc3

Please sign in to comment.