summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-03-18 16:24:51 +0000
committerRobert Speicher <robert@gitlab.com>2016-03-18 16:24:51 +0000
commitaee6dbc6de68df5ac7d61f49131a7a44936cbf59 (patch)
tree080580aa8cf3a03aa8cebd9e1e8b1650db925f59
parent7a33afb760d467bce01819d6d796689585fb0fb4 (diff)
parent6048910aeef723faa535ce7ba6bb88a5e3360df9 (diff)
downloadgitlab-ce-aee6dbc6de68df5ac7d61f49131a7a44936cbf59.tar.gz
Merge branch 'rs-issue-14259' into 'master'
Prevent a 500 when a repository's root_ref is nil Closes #14259 See merge request !3278
-rw-r--r--app/views/layouts/header/_default.html.haml6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 77d01a7736c..f3090b96702 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -46,6 +46,8 @@
%h1.title= title
= render 'shared/outdated_browser'
+
- if @project && !@project.empty_repo?
- :javascript
- var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, @ref || @project.repository.root_ref)}";
+ - if ref = @ref || @project.repository.root_ref
+ :javascript
+ var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, ref)}";