Skip to content

Commit efa922f

Browse files
committed
Fix debug
1 parent bcff909 commit efa922f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dist/components/Marker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
key: 'componentDidUpdate',
137137
value: function componentDidUpdate(prevProps) {
138138
console.log(this.props, prevProps);
139-
if (this.props.map !== prevProps.map || this.props.position.lat() !== prevProps.lat() || this.props.position.lng() !== prevProps.lng() || this.props.icon !== prevProps.icon) {
139+
if (this.props.map !== prevProps.map || this.props.position.lat !== prevProps.lat || this.props.position.lng !== prevProps.lng || this.props.icon !== prevProps.icon) {
140140
if (this.marker) {
141141
this.marker.setMap(null);
142142
}

src/components/Marker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export class Marker extends React.Component {
3737
componentDidUpdate(prevProps) {
3838
console.log(this.props, prevProps);
3939
if ((this.props.map !== prevProps.map) ||
40-
(this.props.position.lat() !== prevProps.lat()) ||
41-
(this.props.position.lng() !== prevProps.lng()) ||
40+
(this.props.position.lat !== prevProps.lat) ||
41+
(this.props.position.lng !== prevProps.lng) ||
4242
(this.props.icon !== prevProps.icon)) {
4343
if (this.marker) {
4444
this.marker.setMap(null);

0 commit comments

Comments
 (0)