Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

show unpopular tags in there aren't any/many popular ones

  • Loading branch information...
commit 3d2277609a193902c63bb046dba5d40e1b917670 1 parent a6ed209
@brianshaler brianshaler authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 public/js/templates/activity_item.ejs
View
4 public/js/templates/activity_item.ejs
@@ -18,7 +18,9 @@
</span>
<p class="activity-item-text"><%= parsed_message %></p>
<span class="activity-item-topics">
- <% topics.forEach(function (topic) { if (topic.instances > 1 || topics.length <= 3) { %>
+ <% popular = [];
+ topics.forEach(function (topic) { if (topic.instances > 1) { popular.push(topic); } });
+ topics.forEach(function (topic) { if (topic.instances > 1 || popular.length <= 3) { %>
<a href="/topic/view/<%= topic._id %>"><%= topic.text %></a>
<% }}); %>
<a href="#" class="add-topic">

0 comments on commit 3d22776

Please sign in to comment.
Something went wrong with that request. Please try again.