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:
authorLin Jen-Shin <godfat@godfat.org>2018-06-13 19:48:03 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-06-13 19:48:03 +0300
commitad48b1251b5dff1dbbf84d70ec7a2f8224370456 (patch)
treeb2782ba64771c6b5c87941d1fdaaf69ef8df8823 /app/views/shared
parent28504273f6177b0461428e48ecc4e91f3709fce9 (diff)
Explicitly set `selected`
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/issuable/_milestone_dropdown.html.haml2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml
index 955b8866c2c..37625a4a163 100644
--- a/app/views/shared/issuable/_milestone_dropdown.html.haml
+++ b/app/views/shared/issuable/_milestone_dropdown.html.haml
@@ -1,6 +1,8 @@
- project = @target_project || @project
- extra_class = extra_class || ''
- show_menu_above = show_menu_above || false
+- selected = local_assigns.fetch(:selected, nil)
+
- selected_text = selected.try(:title) || params[:milestone_title]
- dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone")
- if selected.present? || params[:milestone_title].present?