From f970bb7bfd7704bf578dccc5ea89bc3560e87f65 Mon Sep 17 00:00:00 2001 From: Kevin Abraham Date: Mon, 15 Apr 2019 15:34:02 -0400 Subject: [PATCH] moar fixes 3 --- dist/components/Marker.js | 6 +----- src/components/Marker.js | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) 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) {