diff --git a/app/static/js/ResourceLists/CorpusList.js b/app/static/js/ResourceLists/CorpusList.js index c0e6f6d2..0a8905c5 100644 --- a/app/static/js/ResourceLists/CorpusList.js +++ b/app/static/js/ResourceLists/CorpusList.js @@ -246,17 +246,18 @@ class CorpusList extends ResourceList { this.selectedItemIds.forEach(selectedItemId => { let listItem = this.listjs.get('id', selectedItemId)[0].elm; let values = this.listjs.get('id', listItem.dataset.id)[0].values(); - if (!values['is-owner']) { - Requests.corpora.entity.followers.entity.delete(selectedItemId, currentUserId); - } else { + if (values['is-owner']) { Requests.corpora.entity.delete(selectedItemId); + } else { + Requests.corpora.entity.followers.entity.delete(selectedItemId, currentUserId); + setTimeout(() => { + window.location.reload(); + }, 1000); } }); this.selectedItemIds.clear(); this.renderingItemSelection(); - setTimeout(() => { - window.location.reload(); - }, 1000); + }); modal.open(); break;