From 93175b6e9d5cfa4d4319bd58b9de01824d596288 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 19 Jan 2021 12:44:48 +0100 Subject: Fix: bulk add - delete existing link Do not send redirect response in bookmark delete controller if the request comes from bulk creation page. Fixes #1683 --- assets/common/js/shaare-batch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'assets') diff --git a/assets/common/js/shaare-batch.js b/assets/common/js/shaare-batch.js index 557325ee..2b438045 100644 --- a/assets/common/js/shaare-batch.js +++ b/assets/common/js/shaare-batch.js @@ -26,9 +26,9 @@ const sendBookmarkForm = (basePath, formElement) => { const sendBookmarkDelete = (buttonElement, formElement) => ( new Promise((resolve, reject) => { const xhr = new XMLHttpRequest(); - xhr.open('GET', buttonElement.href); + xhr.open('GET', `${buttonElement.href}&source=batch`); xhr.onload = () => { - if (xhr.status !== 200) { + if (xhr.status !== 204) { alert(`An error occurred. Return code: ${xhr.status}`); reject(); } else { -- cgit v1.2.3