From dee4515cb391e06a0a2cf4b2a6697409527d9f83 Mon Sep 17 00:00:00 2001 From: alger Date: Sat, 24 May 2025 10:11:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=92=8C=E4=B8=8D=E5=96=9C=E6=AC=A2=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=97=B6=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/hooks/useSongItem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/hooks/useSongItem.ts b/src/renderer/hooks/useSongItem.ts index aba5998..2c466f4 100644 --- a/src/renderer/hooks/useSongItem.ts +++ b/src/renderer/hooks/useSongItem.ts @@ -74,7 +74,7 @@ export function useSongItem(props: { // 切换收藏状态 const toggleFavorite = async (e: Event) => { - e.stopPropagation(); + e && e.stopPropagation(); const numericId = typeof props.item.id === 'string' ? parseInt(props.item.id, 10) : props.item.id; if (isFavorite.value) { @@ -86,7 +86,7 @@ export function useSongItem(props: { // 切换不喜欢状态 const toggleDislike = async (e: Event) => { - e.stopPropagation(); + e && e.stopPropagation(); if (isDislike.value) { playerStore.removeFromDislikeList(props.item.id); return;