From ecbb8d73eb5fc9e3b388a2803c2bd7129c111b98 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 19 Jan 2016 14:37:00 -0500 Subject: Add reference to the correct branch. sometimes `@ref` will be `nil`. this makes sure that the correct branch is passed in. --- app/views/layouts/header/_default.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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 -- cgit v1.2.1