Skip to content

Commit

Permalink
WordPress#1004 - Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
mehigh committed Jun 15, 2017
1 parent 7c32aba commit a0a591e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ class InserterMenu extends wp.element.Component {
const visibleBlocksByCategory = this.getVisibleBlocksByCategory( wp.blocks.getBlockTypes() );
const visualEditorHeight = document.querySelector( '.editor-visual-editor' ).clientHeight;
const minimumNeededHeight = 600;
let positionClasses = position.split( ' ' ).map( ( pos ) => `is-${ pos }` );
const positionClasses = position.split( ' ' ).map( ( pos ) => `is-${ pos }` );
if ( visualEditorHeight < minimumNeededHeight ) {
const isTopIndex = positionClasses.indexOf( 'is-top' );
if ( -1 !== isTopIndex ) {
positionClasses[isTopIndex] = 'is-bottom';
};
positionClasses[ isTopIndex ] = 'is-bottom';
}
}
const className = classnames( 'editor-inserter__menu', positionClasses );

Expand Down

0 comments on commit a0a591e

Please sign in to comment.