Add array bounds check in compareSubmit before accessing drag data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user