Skip to content

Commit

Permalink
Prevent default behavior if the confirmation is canceled.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefrosty committed Aug 13, 2020
1 parent 41987d0 commit 31ef1ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/upgrades.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
component.init = function () {
$(function () {
$(document).on('click', 'a[class="wp-upgrade-task-runner-item"]', function (e) {
component.submitTaskRunner($(this))
if (!e.isDefaultPrevented()) {
component.submitTaskRunner($(this))
}
e.preventDefault()
return false
})
Expand Down

0 comments on commit 31ef1ef

Please sign in to comment.