diff --git a/CHANGES.rst b/CHANGES.rst index 566f0d4..a4fa16f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 2.3.3 (unreleased) ------------------ +- Don't execute createReplyForm js if there is no in_reply_to button. + [vincentfretin] + - Register events as Content Rules Event Types if plone.contentrules is present [avoinea] diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index a6bd91f..1e67674 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -106,7 +106,7 @@ var post_comment_div = $("#commenting"); var in_reply_to_field = post_comment_div.find("input[name='form.widgets.in_reply_to']"); - if (in_reply_to_field.val() !== "") { + if (in_reply_to_field.length !== 0 && in_reply_to_field.val() !== "") { var current_reply_id = "#" + in_reply_to_field.val(); var current_reply_to_div = $(".discussion").find(current_reply_id); $.createReplyForm(current_reply_to_div);