Skip to content

Commit

Permalink
Make the paper page resilient to nil tags
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Jul 3, 2023
1 parent 7c95ab5 commit bde5a22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/papers/_show_published.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<span class="__dimensions_badge_embed__" data-doi="<%= @paper.doi %>" data-hide-zero-citations="true"></span>
<div class="paper-meta">
<h1><%= @paper.title %></h1>
<% @paper.language_tags.each do |tag| %>
<% @paper.language_tags.compact.each do |tag| %>
<span class="badge-lang"><%= link_to tag, papers_by_language_path(language: tag) %></span>
<% end %>
<span class="small">Submitted <%= @paper.created_at.strftime('%d %B %Y') %></span>
Expand Down Expand Up @@ -60,7 +60,7 @@

<div class="label">Tags</div>
<p>
<% @paper.author_tags.each do |tag| %>
<% @paper.author_tags.compact.each do |tag| %>
<span class="badge-lang"><%= link_to tag, papers_by_tag_path(tag: tag) %></span>
<% end %>
</p>
Expand Down

0 comments on commit bde5a22

Please sign in to comment.