Commit 162f6f53 authored by Douwe Maan's avatar Douwe Maan

Don't blow up when a tree readme is empty and consequently has no rich viewer

parent c75f1d3d
%article.file-holder.readme-holder - if readme.rich_viewer
.js-file-title.file-title %article.file-holder.readme-holder
= blob_icon readme.mode, readme.name .js-file-title.file-title
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path)) do = blob_icon readme.mode, readme.name
%strong = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path)) do
= readme.name %strong
= readme.name
= render 'projects/blob/viewer', viewer: readme.rich_viewer, viewer_url: namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path), viewer: :rich, format: :json) = render 'projects/blob/viewer', viewer: readme.rich_viewer, viewer_url: namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path), viewer: :rich, format: :json)
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