Skip to content

Commit

Permalink
Merge pull request #914 from josaphatim/fixed-submit-issue-wp-module
Browse files Browse the repository at this point in the history
Fixed submit issue on a non existing element
  • Loading branch information
kroky authored Mar 12, 2024
2 parents b67f1b1 + cfd3923 commit 5c70dd4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions modules/wordpress/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 5c70dd4

Please sign in to comment.