Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserter: Fix React warning when saving reusable blocks #3876

Merged
merged 1 commit into from
Dec 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Inserter: Fix React warning when saving reusable blocks
  • Loading branch information
youknowriad committed Dec 8, 2017
commit 6621de3b6e5b22c5e5a5c0c8cba359ff247ec564
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