From b023d28b7494d15e073f33a6519e933975fe6e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 9 Mar 2026 18:04:33 +0800 Subject: [PATCH] Add array bounds check in compareSubmit before accessing drag data Co-Authored-By: Claude Opus 4.6 --- src/views/Files/FilesPage.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/Files/FilesPage.vue b/src/views/Files/FilesPage.vue index 67b2e2a..bbdabef 100644 --- a/src/views/Files/FilesPage.vue +++ b/src/views/Files/FilesPage.vue @@ -841,6 +841,7 @@ function secondaryDragDelete() { * Enter the Compare page */ function compareSubmit() { + if (primaryDragData.value.length === 0 || secondaryDragData.value.length === 0) return; const primaryType = primaryDragData.value[0].type; const secondaryType = secondaryDragData.value[0].type; const primaryId = primaryDragData.value[0].id;