summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkushalpandya <kushal@gitlab.com>2017-09-05 13:04:38 +0530
committerkushalpandya <kushal@gitlab.com>2017-09-05 13:11:21 +0530
commit3440d90983954466a69dcb2804f2562b51762d63 (patch)
treee898ba44126ca31bb926cddb3466591496a801d6
parent81e0ebb4d8fa7f076277ebbb42556544991d9ad7 (diff)
downloadgitlab-ce-3440d90983954466a69dcb2804f2562b51762d63.tar.gz
Fix project metadata accessor
-rw-r--r--app/views/layouts/nav/projects_dropdown/_show.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/layouts/nav/projects_dropdown/_show.html.haml b/app/views/layouts/nav/projects_dropdown/_show.html.haml
index 540e08e6240..a7370180bf6 100644
--- a/app/views/layouts/nav/projects_dropdown/_show.html.haml
+++ b/app/views/layouts/nav/projects_dropdown/_show.html.haml
@@ -1,3 +1,4 @@
+- project_meta = { id: @project.id, name: @project.name, namespace: @project.name_with_namespace, web_url: @project.web_url, avatar_url: @project.avatar_url } if @project&.persisted?
.projects-dropdown-container
.project-dropdown-sidebar
%ul
@@ -11,4 +12,4 @@
= link_to explore_root_path do
= _('Explore projects')
.project-dropdown-content
- #js-projects-dropdown{ data: { user_name: current_user.username, project: ({ id: @project.id, name: @project.name, namespace: @project.name_with_namespace, web_url: @project.web_url, avatar_url: @project.avatar_url } if @project.present?) } }
+ #js-projects-dropdown{ data: { user_name: current_user.username, project: project_meta } }