diff --git a/modules/wordpress/site.js b/modules/wordpress/site.js index bc16516e04..d7375f5a7b 100644 --- a/modules/wordpress/site.js +++ b/modules/wordpress/site.js @@ -55,13 +55,15 @@ if (hm_page_name() == 'message_list') { } } else if (hm_page_name() == 'servers') { - $('#wp_disconnect_form').submit(function(e) { - if (!hm_delete_prompt()) { - e.preventDefault(); - return false; - } - return true; - }); + if ($('#wp_disconnect_form').length) { + $('#wp_disconnect_form').submit(function(e) { + if (!hm_delete_prompt()) { + e.preventDefault(); + return false; + } + return true; + }); + } } else if (hm_page_name() == 'message') { if (hm_list_path() == 'wp_notifications') {