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