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 135135 } , {
136136 key : 'componentDidUpdate' ,
137137 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 ) {
139139 if ( this . marker ) {
140140 this . marker . setMap ( null ) ;
141141 }
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ export class Marker extends React.Component {
3636
3737 componentDidUpdate ( prevProps ) {
3838 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 ( ) ) ||
4041 ( this . props . icon !== prevProps . icon ) ) {
4142 if ( this . marker ) {
4243 this . marker . setMap ( null ) ;
You can’t perform that action at this time.
0 commit comments