From: Sarven Capadisli Date: Fri, 30 Oct 2009 16:06:11 +0000 (+0000) Subject: Fixed Nudge XHR X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=87781b85c4eb0925f04bfb9f1468d8b4a26af39a;p=quix0rs-gnu-social.git Fixed Nudge XHR --- diff --git a/js/util.js b/js/util.js index f8e71d440d..75b9addb2c 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)); }); }