Skip to content

Commit

Permalink
moar fixes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
abraha2d committed Apr 15, 2019
1 parent 248a1e4 commit 2c26267
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/components/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@
}, {
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.marker) {
this.marker.setMap(null);
Expand Down
4 changes: 4 additions & 0 deletions src/components/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ 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) ||
!isEqual(this.props.position, prevProps.position) ||
!isEqual(this.props.icon, prevProps.icon)) {
Expand Down

0 comments on commit 2c26267

Please sign in to comment.