We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5acb49e commit 0bfaea6Copy full SHA for 0bfaea6
packages/vue-mapbox-gl/composables/useControl.ts
@@ -62,7 +62,7 @@ export function useControl(ControlConstructor, { propsConfig, props, emit, event
62
});
63
64
onUnmounted(() => {
65
- if (unref(control) && unref(map)) {
+ if (unref(control) && unref(map) && unref(map).hasControl(unref(control))) {
66
unref(map).removeControl(unref(control));
67
}
68
0 commit comments