We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9eee96a + 0ff46f0 commit 1a5a5ffCopy full SHA for 1a5a5ff
src/GeocoderControl.js
@@ -40,7 +40,6 @@ export default {
40
},
41
mapboxgl: {
42
type: Object,
43
- required: true,
44
default: null,
45
46
@@ -68,16 +67,19 @@ export default {
68
67
69
70
created() {
+ let mapboxgl = this.mapbox;
71
this.control = null;
72
if (this.accessToken && !this.mapbox.accessToken) {
73
this.mapbox.accessToken = this.accessToken;
74
}
75
-
+ if (this.mapboxgl) {
76
+ mapboxgl = this.mapboxgl;
77
+ }
78
this.control = new MapboxGeocoder({
79
...this.$attrs,
80
proximity: this.proximity,
81
accessToken: this.accessToken,
- mapboxgl: this.mapboxgl,
82
+ mapboxgl,
83
});
84
85
this.control.on('results', this.$_updateInput);
0 commit comments