File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 136
136
key : 'componentDidUpdate' ,
137
137
value : function componentDidUpdate ( prevProps ) {
138
138
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 ) {
140
140
if ( this . marker ) {
141
141
this . marker . setMap ( null ) ;
142
142
}
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ export class Marker extends React.Component {
37
37
componentDidUpdate ( prevProps ) {
38
38
console . log ( this . props , prevProps ) ;
39
39
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 ) ||
42
42
( this . props . icon !== prevProps . icon ) ) {
43
43
if ( this . marker ) {
44
44
this . marker . setMap ( null ) ;
You can’t perform that action at this time.
0 commit comments