From 209bf9e0aa636c7e63395335af3424ce5f56378c Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 4 Nov 2022 19:17:13 +0800 Subject: [PATCH] fix --- src/renderer/store/hotSearch.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderer/store/hotSearch.ts b/src/renderer/store/hotSearch.ts index 0f26f7a6..4da7b460 100644 --- a/src/renderer/store/hotSearch.ts +++ b/src/renderer/store/hotSearch.ts @@ -52,10 +52,10 @@ export const getList = async(source: Source): Promise => { task.push( sourceList[source]?.length ? Promise.resolve({ source, list: sourceList[source] }) - : music[source]?.hotSearch.getList().catch((err: any) => { - console.log(err) - return { source, list: [] } - }) ?? Promise.reject(new Error('source not found: ' + source)), + : (music[source]?.hotSearch.getList() ?? Promise.reject(new Error('source not found: ' + source))).catch((err: any) => { + console.log(err) + return { source, list: [] } + }), ) } return Promise.all(task).then((results: any[]) => {