Commit 8fda49ff authored by Paul Slaughter's avatar Paul Slaughter
parent a2204ab2
import Rails from '@rails/ujs';
import { confirmViaGlModal } from './confirm_via_gl_modal/confirm_via_gl_modal';
import { ignoreWhilePending } from './ignore_while_pending';
function monkeyPatchConfirmModal() {
/**
......@@ -18,8 +19,10 @@ function monkeyPatchConfirmModal() {
* @param element {HTMLElement} Element that was clicked on
* @returns {boolean}
*/
const safeConfirm = ignoreWhilePending(confirmViaGlModal);
function confirmViaModal(message, element) {
confirmViaGlModal(message, element)
safeConfirm(message, element)
.then((confirmed) => {
if (confirmed) {
Rails.confirm = () => true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment