added conditional to render tags wrapper only if there are tags

This commit is contained in:
Tom Giannattasio
2012-09-13 10:59:47 -04:00
parent 3496e4ee05
commit 6e217b315d

View File

@@ -34,8 +34,10 @@ if Backbone?
@responsesRequest.abort()
renderTags: ->
tags = $('<div class="thread-tags">')
tags
for tag in @model.get("tags")
if !tags
tags = $('<div class="thread-tags">')
tags.append("<a class='thread-tag'>#{tag}</a>")
@$(".post-body").after(tags)