fixed inline thread replace error

This commit is contained in:
Tom Giannattasio
2012-09-13 10:25:10 -04:00
parent 85abb71398
commit a152041ef8
2 changed files with 4 additions and 3 deletions

View File

@@ -125,7 +125,8 @@ class @DiscussionThreadShowView extends DiscussionContentView
@model.set('endorsed', not endorsed)
highlight: (el) ->
el.html(el.html().replace(/&lt;mark&gt;/g, "<mark>").replace(/&lt;\/mark&gt;/g, "</mark>"))
if el.html()
el.html(el.html().replace(/&lt;mark&gt;/g, "<mark>").replace(/&lt;\/mark&gt;/g, "</mark>"))
class @DiscussionThreadInlineShowView extends DiscussionThreadShowView
renderTemplate: ->

View File

@@ -6,10 +6,10 @@
<h3>{{title}}</h3>
<p class="posted-details">
{{#user}}
<a href="{{user_url}}" class="username">{{username}}</a>
<a href="{{user_url}}" class="username">{{username}}</a>
{{/user}}
{{^user}}
anonymous
anonymous
{{/user}}
<span class="timeago" title="{{created_at}}">{{created_at}}</span>