diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 12:09:38 +0300 |
commit | bc9b43904d491c7b864c8fb6ba06ae0f6625db0d (patch) | |
tree | ca0a5ae3bbbf98530707b96a7db08d1bd773b429 /app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue | |
parent | 10476ea7d8253d8462e092ed95aedc01204238bc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue')
-rw-r--r-- | app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue index b4bb8a99452..f06de2ca048 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue +++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue @@ -15,6 +15,7 @@ import { WORK_ITEMS_TREE_TEXT_MAP, WORK_ITEM_TYPE_ENUM_OBJECTIVE, WORK_ITEM_TYPE_ENUM_KEY_RESULT, + WORK_ITEM_TYPE_VALUE_OBJECTIVE, } from '../../constants'; import workItemQuery from '../../graphql/work_item.query.graphql'; import workItemByIidQuery from '../../graphql/work_item_by_iid.query.graphql'; @@ -148,13 +149,17 @@ export default { }); }, prefetchWorkItem({ id, iid }) { - this.prefetch = setTimeout( - () => this.addWorkItemQuery({ id, iid }), - DEFAULT_DEBOUNCE_AND_THROTTLE_MS, - ); + if (this.workItemType !== WORK_ITEM_TYPE_VALUE_OBJECTIVE) { + this.prefetch = setTimeout( + () => this.addWorkItemQuery({ id, iid }), + DEFAULT_DEBOUNCE_AND_THROTTLE_MS, + ); + } }, clearPrefetching() { - clearTimeout(this.prefetch); + if (this.prefetch) { + clearTimeout(this.prefetch); + } }, }, }; |