Commit 351082d9 authored by Miguel Rincon's avatar Miguel Rincon

Fix console warning after popover removal

This change makes the reference to the target of the popover optional
to prevent a console warning during the removal of a popover.
parent f64be48c
......@@ -21,12 +21,17 @@ export default {
default: () => ({}),
},
},
methods: {
targetFn() {
return this.$refs.popoverTrigger?.$el;
},
},
};
</script>
<template>
<span>
<gl-button ref="popoverTrigger" variant="link" icon="question-o" :aria-label="__('Help')" />
<gl-popover :target="() => $refs.popoverTrigger.$el" v-bind="options">
<gl-popover :target="targetFn" v-bind="options">
<template v-if="options.title" #title>
<span v-safe-html="options.title"></span>
</template>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment