Commit 4d48c607 authored by Robert Speicher's avatar Robert Speicher Committed by Rémy Coutable

Merge branch 'rs-issue-14259' into 'master'

Prevent a 500 when a repository's root_ref is nil

Closes #14259

See merge request !3278
parent f6f949f4
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
%h1.title= title %h1.title= title
= render 'shared/outdated_browser' = render 'shared/outdated_browser'
- if @project && !@project.empty_repo? - if @project && !@project.empty_repo?
- if ref = @ref || @project.repository.root_ref
:javascript :javascript
var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, @ref || @project.repository.root_ref)}"; var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, ref)}";
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment