diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index f90f91b4fab..b3e71965a07 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -379,7 +379,9 @@ class Notes # does it already have notes? if nextRow.is(".notes_holder") - $.proxy(@replyToDiscussionNote, nextRow.find(".js-discussion-reply-button")).call() + replyButton = nextRow.find(".js-discussion-reply-button") + if replyButton.length > 0 + $.proxy(@replyToDiscussionNote, replyButton).call() else # add a notes row and insert the form row.after "