Commit a30aa411 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'dm-empty-tree-readme' into 'master'

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

Closes #32396

See merge request !11459
parents 6319ca27 162f6f53
%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