Skip to content

Commit

Permalink
Block Toolbar: Hide the block toolbar if no block is selected (#9812)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Sep 12, 2018
1 parent 8938cdd commit 4ac79ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/editor/src/components/block-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class BlockToolbar extends Component {

render() {
const { blockClientIds, isValid, mode } = this.props;

if ( blockClientIds.length === 0 ) {
return null;
}

if ( blockClientIds.length > 1 ) {
return (
<div className="editor-block-toolbar" ref={ this.container }>
Expand Down

0 comments on commit 4ac79ff

Please sign in to comment.