summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-30 16:06:11 +0000
committerSarven Capadisli <csarven@status.net>2009-10-30 16:06:11 +0000
commit87781b85c4eb0925f04bfb9f1468d8b4a26af39a (patch)
treefc4ef209eb641615c688f290025a56b63289e433 /js
parent93506faaa608efbcf264bb3f1f0ed363d81bb390 (diff)
Fixed Nudge XHR
Diffstat (limited to 'js')
-rw-r--r--js/util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js
index f8e71d440..75b9addb2 100644
--- a/js/util.js
+++ b/js/util.js
@@ -158,8 +158,8 @@ var SN = { // StatusNet
alert(errorThrown || textStatus);
},
success: function(data, textStatus) {
- form_new = document._importNode($('form', data)[0], true);
- if (form_new.length > 0) {
+ if (typeof($('form', data)[0]) != 'undefined') {
+ form_new = document._importNode($('form', data)[0], true);
$('#'+form_id).replaceWith(form_new);
$('#'+form_new.id).each(function() { SN.U.FormXHR($(this)); });
}