summaryrefslogtreecommitdiff
path: root/modules/comment/js
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-16 14:57:24 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-16 14:57:24 -0800
commit78b6da12aa08aad0fbae74bc03c1afddb609c150 (patch)
treea5e037ab9a0f1e221ae865e82e344d8250498fe4 /modules/comment/js
parent2d6f5cda6c382028ccd75cdd71397da5404bb884 (diff)
Make sure that we have a valid resource from the server side before we
fetch its url. Fixes ticket #888.
Diffstat (limited to 'modules/comment/js')
-rw-r--r--modules/comment/js/comment.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index 96370fb1..3f058062 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -32,7 +32,7 @@ function ajaxify_comment_form() {
$("#g-comments form").replaceWith(data.form);
ajaxify_comment_form();
}
- if (data.result == "success") {
+ if (data.result == "success" && data.resource) {
$.get(data.resource, function(data, textStatus) {
$("#g-comments .g-block-content ul:first").append("<li>"+data+"</li>");
$("#g-comments .g-block-content ul:first li:last").effect("highlight", {color: "#cfc"}, 8000);