Don't blow up when a tree readme is empty and consequently has no rich viewer
This commit is contained in:
parent
c75f1d3d44
commit
162f6f5363
1 changed files with 8 additions and 7 deletions
|
@ -1,8 +1,9 @@
|
|||
%article.file-holder.readme-holder
|
||||
.js-file-title.file-title
|
||||
= blob_icon readme.mode, readme.name
|
||||
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path)) do
|
||||
%strong
|
||||
= readme.name
|
||||
- if readme.rich_viewer
|
||||
%article.file-holder.readme-holder
|
||||
.js-file-title.file-title
|
||||
= blob_icon readme.mode, readme.name
|
||||
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path)) do
|
||||
%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)
|
||||
|
|
Loading…
Reference in a new issue