File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export default {
106
106
107
107
beforeDestroy () {
108
108
if (this .parentContainer .mapObject ) {
109
- this .parentContainer .mapObject .setIcon (null );
109
+ this .parentContainer .mapObject .setIcon (this . parentContainer . $props . icon );
110
110
}
111
111
112
112
this .observer .disconnect ();
@@ -127,7 +127,7 @@ export default {
127
127
128
128
createIcon () {
129
129
// If only html of a divIcon changed, we can just replace the DOM without the need of recreating the whole icon
130
- if (this .htmlSwapNeeded && ! this .recreationNeeded && this .iconObject ) {
130
+ if (this .htmlSwapNeeded && ! this .recreationNeeded && this .iconObject && this . parentContainer . mapObject . getElement () ) {
131
131
this .parentContainer .mapObject .getElement ().innerHTML = this .$el .innerHTML ;
132
132
133
133
this .htmlSwapNeeded = false ;
You can’t perform that action at this time.
0 commit comments