Skip to content

Commit 13fa262

Browse files
Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 1ecf92c commit 13fa262

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)