Skip to content

Commit

Permalink
Clarify var usage
Browse files Browse the repository at this point in the history
  • Loading branch information
johngodley committed Aug 23, 2018
1 parent 1961923 commit b32e09f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,11 @@ export class BlockListBlock extends Component {
const canShowInBetweenInserter = ! isEmptyDefaultBlock && ! isPreviousBlockADefaultEmptyBlock;

// We allow an invalid block to be re-edited in HTML mode
const isValidMode = isValid || mode === 'html';
const isValidOrHtml = isValid || mode === 'html';

// Generate the wrapper class names handling the different states of the block.
const wrapperClassName = classnames( 'editor-block-list__block', {
'has-warning': ! isValidMode || !! error,
'has-warning': ! isValidOrHtml || !! error,
'is-selected': shouldAppearSelected,
'is-multi-selected': isPartOfMultiSelection,
'is-selected-parent': shouldAppearSelectedParent,
Expand Down Expand Up @@ -549,7 +549,7 @@ export class BlockListBlock extends Component {
{ mode === 'html' && (
<BlockHtml clientId={ clientId } />
) }
{ ! isValidMode && [
{ ! isValidOrHtml && [
<div key="invalid-preview">
{ getSaveElement( blockType, block.attributes ) }
</div>,
Expand Down

0 comments on commit b32e09f

Please sign in to comment.