diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-19 14:37:00 -0500 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-19 14:37:00 -0500 |
commit | ecbb8d73eb5fc9e3b388a2803c2bd7129c111b98 (patch) | |
tree | c0757112e6c9d61bad6d3a4b2cf937332caf9251 | |
parent | 34564296d00408ec585bb78370cf8710a22ffdf4 (diff) | |
download | gitlab-ce-ecbb8d73eb5fc9e3b388a2803c2bd7129c111b98.tar.gz |
Add reference to the correct branch.
sometimes `@ref` will be `nil`.
this makes sure that the correct branch is passed in.
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index a938a0c70b9..ec1bdf69095 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -39,4 +39,4 @@ = render 'shared/outdated_browser' -if defined?(@project) :javascript - var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @ref)}';
\ No newline at end of file + var findFileURL = '#{namespace_project_find_file_path(@project.namespace, @project, @ref || @project.repository.root_ref)}';
\ No newline at end of file |