Commit ecbb8d73 authored by Jacob Schatz's avatar Jacob Schatz

Add reference to the correct branch.

sometimes `@ref` will be `nil`.
this makes sure that the correct branch is passed in.
parent 34564296
......@@ -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
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