diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index a938a0c70b..ec1bdf6909 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