Skip to content

Commit

Permalink
moar fixes 3
Browse files Browse the repository at this point in the history
  • Loading branch information
abraha2d committed Apr 15, 2019
1 parent 2c26267 commit f970bb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions dist/components/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f970bb7

Please sign in to comment.