diff options
Diffstat (limited to 'modules/comment/js')
-rw-r--r-- | modules/comment/js/comment.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 3ae23f62..c9cfeb08 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -6,8 +6,10 @@ function ajaxify_comment_form() { $("#gComments form").ajaxForm({ dataType: "json", success: function(data) { - $("#gComments form").replaceWith(data.form); - ajaxify_comment_form(); + if (data.form) { + $("#gComments form").replaceWith(data.form); + ajaxify_comment_form(); + } if (data.result == "success") { $.get(data.resource, function(data, textStatus) { $("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>"); |