diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/views/SharingTab.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index 0d5c1734548..f37f2095a90 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -356,9 +356,16 @@ export default { * @param {Share} share the share to remove */ removeShare(share) { - const index = this.shares.findIndex(item => item.id === share.id) - // eslint-disable-next-line vue/no-mutating-props - this.shares.splice(index, 1) + // Get reference for this.linkShares or this.shares + const shareList + = share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL + || share.type === this.SHARE_TYPES.SHARE_TYPE_LINK + ? this.linkShares + : this.shares + const index = shareList.findIndex(item => item.id === share.id) + if (index !== -1) { + shareList.splice(index, 1) + } }, /** * Await for next tick and render after the list updated |