diff --git a/dist/components/Marker.js b/dist/components/Marker.js index 4fc64da1..bb7f6cfa 100644 --- a/dist/components/Marker.js +++ b/dist/components/Marker.js @@ -135,11 +135,7 @@ }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { - console.log("----------"); - console.log(this.props.map == prevProps.map); - console.log(this.props.position == prevProps.position); - console.log(this.props.icon == prevProps.icon); - if (!(0, _lodash.isEqual)(this.props.map, prevProps.map) || !(0, _lodash.isEqual)(this.props.position, prevProps.position) || !(0, _lodash.isEqual)(this.props.icon, prevProps.icon)) { + if (this.props.map !== prevProps.map || !(0, _lodash.isEqual)(this.props.position, prevProps.position) || !(0, _lodash.isEqual)(this.props.icon, prevProps.icon)) { if (this.marker) { this.marker.setMap(null); } diff --git a/src/components/Marker.js b/src/components/Marker.js index 050592f5..dd3eabe3 100644 --- a/src/components/Marker.js +++ b/src/components/Marker.js @@ -36,11 +36,7 @@ export class Marker extends React.Component { } componentDidUpdate(prevProps) { - console.log("----------"); - console.log(this.props.map == prevProps.map); - console.log(this.props.position == prevProps.position); - console.log(this.props.icon == prevProps.icon); - if (!isEqual(this.props.map, prevProps.map) || + if ((this.props.map !== prevProps.map) || !isEqual(this.props.position, prevProps.position) || !isEqual(this.props.icon, prevProps.icon)) { if (this.marker) {