favorites: fix empty favorites tooltip.
Fix the favorites tooltip being empty when a post has no favorites.
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
<div class="favorites-tooltip thin-scrollbar">
|
||||
<div class="post-favoriters">
|
||||
<% favorites.each do |favorite| %>
|
||||
<div class="post-favoriter truncate">
|
||||
<%= favoriter_name(favorite) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if favorites.length > 0 %>
|
||||
<div class="post-favoriters">
|
||||
<% favorites.each do |favorite| %>
|
||||
<div class="post-favoriter truncate">
|
||||
<%= favoriter_name(favorite) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<i>No favorites yet</i>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user