Skip to content

Commit 8dd879e

Browse files
authored
Merge pull request #657 from fernando-almeida/master
Fix bug in LIcon not properly referencing parent container's map object
2 parents dcb0c85 + f8d88de commit 8dd879e

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)