Skip to content

Commit 6964b45

Browse files
Merge branch 'dev-perf' of github.com:imsyy/SPlayer into dev-perf
2 parents 80d7108 + 13fa262 commit 6964b45

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

electron/main/ipc/ipc-file.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,11 @@ const initFileIpc = (): void => {
532532
}
533533
},
534534
});
535-
} catch (error: any) {
536-
if (error.message === "The download was cancelled") {
537-
return { status: "cancelled", message: "下载已取消" };
538-
}
539-
throw error;
535+
} catch (error: unknown) {
536+
if (error instanceof Error && error.message === "The download was cancelled") {
537+
return { status: "cancelled", message: "下载已取消" };
538+
}
539+
throw error;
540540
} finally {
541541
if (songData?.id) {
542542
downloadItems.delete(songData.id);

0 commit comments

Comments
 (0)