Skip to content

Commit 8f60759

Browse files
Fix bug in LIcon not properly referencing parent container's map object, in particular when using a custom vue-component.
1 parent 5726da2 commit 8f60759

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/LIcon.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ export default {
9292
9393
mounted() {
9494
this.parentContainer = findRealParent(this.$parent);
95-
96-
propsBinder(this, this.$parent.mapObject, this.$options.props);
95+
if (!this.parentContainer) {
96+
throw new Error('No parent container with mapObject found for LIcon');
97+
}
98+
propsBinder(this, this.parentContainer.mapObject, this.$options.props);
9799
98100
this.observer = new MutationObserver(() => {
99101
this.scheduleHtmlSwap();

0 commit comments

Comments
 (0)