Commit b7f90329 authored by Scott Stern's avatar Scott Stern Committed by Kushal Pandya

Fix errors when board sidebar is closed

parent c603a068
......@@ -16,7 +16,7 @@ export default {
},
activeBoardItem: (state) => {
return state.boardItems[state.activeId] || {};
return state.boardItems[state.activeId] || { iid: '', id: '', fullId: '' };
},
groupPathForActiveIssue: (_, getters) => {
......
......@@ -149,6 +149,9 @@ export default {
},
},
methods: {
epicDatePopoverEl() {
return this.$refs?.epicDatePopover?.$el;
},
closeForm() {
this.$refs.editable.collapse();
this.$el.dispatchEvent(hideDropdownEvent);
......@@ -249,12 +252,7 @@ export default {
:aria-label="$options.i18n.help"
data-testid="inherit-date-popover"
/>
<gl-popover
:target="() => $refs.epicDatePopover.$el"
triggers="focus"
placement="left"
boundary="viewport"
>
<gl-popover :target="epicDatePopoverEl" triggers="focus" placement="left" boundary="viewport">
<p>{{ $options.i18n.dateHelpValidMessage }}</p>
<gl-link :href="$options.dateHelpUrl" target="_blank">{{
$options.i18n.learnMore
......
......@@ -92,7 +92,7 @@ describe('Boards - Getters', () => {
it.each`
id | expected
${'1'} | ${'issue'}
${''} | ${{}}
${''} | ${{ id: '', iid: '', fullId: '' }}
`('returns $expected when $id is passed to state', ({ id, expected }) => {
const state = { boardItems: { 1: 'issue' }, activeId: id };
......
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