From a69fac84627d711858912a8b68650e574acc954b Mon Sep 17 00:00:00 2001 From: jmal Date: Tue, 5 Aug 2025 11:04:09 +0800 Subject: [PATCH] fix: ensure safe removal of item from fileList during single share cancellation --- src/views/share/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/share/index.vue b/src/views/share/index.vue index ec23530..4d0183a 100644 --- a/src/views/share/index.vue +++ b/src/views/share/index.vue @@ -512,7 +512,9 @@ if(shareIds.length === 1){ // 如果是单个取消分享 const index = this.fileList.findIndex(item => item.id === shareIds[0]) - this.fileList.splice(index,1) + if (index > -1) { + this.fileList.splice(index, 1) + } }else{ this.getFileList() }