diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/assets/javascripts/sidebar/components/todo_toggle | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/sidebar/components/todo_toggle')
-rw-r--r-- | app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue index a9c4203af22..eabba619af5 100644 --- a/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue +++ b/app/assets/javascripts/sidebar/components/todo_toggle/sidebar_todo_widget.vue @@ -59,6 +59,10 @@ export default { return data.workspace?.issuable?.currentUserTodos.nodes[0]?.id; }, result({ data }) { + if (!data) { + return; + } + const currentUserTodos = data.workspace?.issuable?.currentUserTodos?.nodes ?? []; this.todoId = currentUserTodos[0]?.id; this.$emit('todoUpdated', currentUserTodos.length > 0); @@ -177,19 +181,14 @@ export default { /> <gl-button v-if="isClassicSidebar" + v-gl-tooltip.left.viewport + :title="tootltipTitle" category="tertiary" type="reset" class="sidebar-collapsed-icon sidebar-collapsed-container gl-rounded-0! gl-shadow-none!" @click.stop.prevent="toggleTodo" > - <gl-icon - v-gl-tooltip.left.viewport - :title="tootltipTitle" - :size="16" - :class="{ 'todo-undone': hasTodo }" - :name="collapsedButtonIcon" - :aria-label="collapsedButtonIcon" - /> + <gl-icon :class="{ 'todo-undone': hasTodo }" :name="collapsedButtonIcon" /> </gl-button> </div> </template> |