We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 80d7108 + 13fa262 commit 6964b45Copy full SHA for 6964b45
1 file changed
electron/main/ipc/ipc-file.ts
@@ -532,11 +532,11 @@ const initFileIpc = (): void => {
532
}
533
},
534
});
535
- } catch (error: any) {
536
- if (error.message === "The download was cancelled") {
537
- return { status: "cancelled", message: "下载已取消" };
538
- }
539
- throw error;
+} catch (error: unknown) {
+ if (error instanceof Error && error.message === "The download was cancelled") {
+ return { status: "cancelled", message: "下载已取消" };
+ }
+ throw error;
540
} finally {
541
if (songData?.id) {
542
downloadItems.delete(songData.id);
0 commit comments