Skip to content

Commit

Permalink
Block HTML Mode: Drop unnecessary omit and fix a label
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 3, 2017
1 parent 20a00b3 commit c3c8eed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion editor/block-settings-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function BlockSettingsMenu( { onDelete, onToggleMode, onSelect, isSidebarOpened,
className="editor-block-settings-menu__control"
onClick={ onToggleMode }
icon="html"
label={ __( 'Switch between the visual/textual mode' ) }
label={ __( 'Switch between the visual/text mode' ) }
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions editor/modes/visual-editor/block-html.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress Dependencies
*/
import { isEqual, omit, keys } from 'lodash';
import { isEqual } from 'lodash';
import { Component } from '@wordpress/element';
import { getBlockContent, getSourcedAttributes, getBlockType, isValidBlock } from '@wordpress/blocks';

Expand Down Expand Up @@ -39,7 +39,7 @@ class BlockHTML extends Component {
const blockType = getBlockType( this.props.block.name );
const sourcedAttributes = getSourcedAttributes( this.state.html, blockType.attributes );
const attributes = {
...( omit( this.props.block.attributes, keys( sourcedAttributes ) ) ),
...this.props.block.attributes,
...sourcedAttributes,
};
const isValid = isValidBlock( this.state.html, blockType, attributes );
Expand Down

0 comments on commit c3c8eed

Please sign in to comment.