Skip to content

Commit

Permalink
Extract isSelected from props and use it for checking current block s…
Browse files Browse the repository at this point in the history
…election
  • Loading branch information
thrijith committed Dec 16, 2019
1 parent b5b022f commit 4b0d44f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/blocks/map/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MapEdit extends Component {
noticeOperations.createErrorNotice( message );
};
render() {
const { className, setAttributes, attributes, noticeUI, notices } = this.props;
const { className, setAttributes, attributes, noticeUI, notices, isSelected } = this.props;
const {
mapStyle,
mapDetails,
Expand Down Expand Up @@ -266,7 +266,7 @@ class MapEdit extends Component {
onMarkerClick={ () => this.setState( { addPointVisibility: false } ) }
onError={ this.onError }
>
{ this.props.isSelected && addPointVisibility && (
{ isSelected && addPointVisibility && (
<AddPoint
onAddPoint={ this.addPoint }
onClose={ () => this.setState( { addPointVisibility: false } ) }
Expand Down

0 comments on commit 4b0d44f

Please sign in to comment.