Commit 6d753ae3 by Arjun Singh

Ensure that ability is present when showing endorse button

parent 3e241182
......@@ -6,10 +6,10 @@ if Backbone?
if endorsed
@$(".action-endorse").show().addClass("is-endorsed")
else
if not @model.get('ability').can_endorse
@$(".action-endorse").hide()
else
if @model.get('ability')?.can_endorse
@$(".action-endorse").show()
else
@$(".action-endorse").hide()
@$(".action-endorse").removeClass("is-endorsed")
closed: (closed) ->
......
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