Skip to content

Commit 5a306f9

Browse files
committed
Bugfix swapping HTML when marker is not on the map
1 parent 3b50c49 commit 5a306f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/LIcon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default {
127127
128128
createIcon () {
129129
// 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()) {
131131
this.parentContainer.mapObject.getElement().innerHTML = this.$el.innerHTML;
132132
133133
this.htmlSwapNeeded = false;

0 commit comments

Comments
 (0)