Commit 7377abf8 authored by Jacob Schatz's avatar Jacob Schatz

Simplifies the HAML if statement for project branch URL

parent f1b4f20c
......@@ -37,10 +37,6 @@
%h1.title= title
= render 'shared/outdated_browser'
-if @project && !@project.empty_repo? && @ref
- if @project && !@project.empty_repo?
:javascript
var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, @ref)}";
-elsif @project && !@project.empty_repo?
:javascript
var findFileURL = "#{namespace_project_find_file_path(@project.namespace, @project, @project.repository.root_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
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