summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorcsarven <csarven@controlyourself.ca>2008-11-20 18:49:23 -0500
committercsarven <csarven@controlyourself.ca>2008-11-20 18:49:23 -0500
commitfe6738b6c713480cc2d1c186177770fdaa448e96 (patch)
tree8ec26e82829319874ae37d640675b1e441f15fab /js/util.js
parentb2fcbba66533b0d9fb51a83badf0560ab08e91b8 (diff)
importNode bugfix for undefined node
darcs-hash:20081120234923-eefa4-952f059fdda781d3f223a1f26af4741b59bb9421.gz
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js
index b3165647f..653d24b42 100644
--- a/js/util.js
+++ b/js/util.js
@@ -99,8 +99,14 @@ $(document).ready(function(){
var form_subscribe_id = form_unsubscribe_id.replace('unsubscribe', 'subscribe');
$("form#"+form_subscribe_id).replaceWith(form_unsubscribe);
$("form#"+form_unsubscribe_id).ajaxForm(UnSubscribe).each(addAjaxHidden);
- $("#profile_actions").append(document._importNode($('#profile_send_a_new_message', xml).get(0), true));
- $("#profile_actions").append(document._importNode($('#profile_nudge', xml).get(0), true));
+ var p_sanm = $('#profile_send_a_new_message', xml).get(0);
+ if (p_sanm) {
+ $("#profile_actions").append(document._importNode(p_sanm, true));
+ }
+ var p_n = $('#profile_nudge', xml).get(0);
+ if (p_n) {
+ $("#profile_actions").append(document._importNode(p_n, true));
+ }
}
};