Commit b461ef7e by Rocky Duan

fixed null text error

parent 77eef644
...@@ -45,6 +45,7 @@ $ -> ...@@ -45,6 +45,7 @@ $ ->
removeMath: (text) -> removeMath: (text) ->
text = text || ""
@math = [] @math = []
start = end = last = null start = end = last = null
braces = 0 braces = 0
......
...@@ -11,7 +11,6 @@ class @ThreadResponseView extends DiscussionContentView ...@@ -11,7 +11,6 @@ class @ThreadResponseView extends DiscussionContentView
render: -> render: ->
@$el.html(@template(@model.toJSON())) @$el.html(@template(@model.toJSON()))
@initLocal() @initLocal()
console.log @$local
@delegateEvents() @delegateEvents()
if window.user.voted(@model) if window.user.voted(@model)
@$(".vote-btn").addClass("is-cast") @$(".vote-btn").addClass("is-cast")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment