Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2019-01-18 11:51:07 +0300
committerTim Zallmann <tzallmann@gitlab.com>2019-01-18 11:51:07 +0300
commit8edfbe3d8de3a7cbae28f5295f3f03287c3599cf (patch)
tree9fc81aa40f4beb99d36b0fa695081db78de886da /app/assets/javascripts/frequent_items
parent07f6c1b8741b6968bc278db855af4883ad68a31d (diff)
Fixed problem when element in main menu is not there (specs)
Diffstat (limited to 'app/assets/javascripts/frequent_items')
-rw-r--r--app/assets/javascripts/frequent_items/components/app.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/frequent_items/components/app.vue b/app/assets/javascripts/frequent_items/components/app.vue
index 3b8f7ca9e07..968e255e1fc 100644
--- a/app/assets/javascripts/frequent_items/components/app.vue
+++ b/app/assets/javascripts/frequent_items/components/app.vue
@@ -49,7 +49,8 @@ export default {
eventHub.$on(`${this.namespace}-dropdownOpen`, this.dropdownOpenHandler);
// As we init it through requestIdleCallback it could be that the dropdown is already open
- if (document.getElementById(`nav-${this.namespace}-dropdown`).classList.contains('show')) {
+ const namespaceDropdown = document.getElementById(`nav-${this.namespace}-dropdown`);
+ if (namespaceDropdown && namespaceDropdown.classList.contains('show')) {
this.dropdownOpenHandler();
}
},