From e89bf8e455992fbe46fd00999b2b9ccf814b7f4d Mon Sep 17 00:00:00 2001 From: ltctceplrm <14954927+ltctceplrm@users.noreply.github.com> Date: Sat, 23 Sep 2023 00:29:24 +0200 Subject: [PATCH] Added fallback if there is no default cover --- src/api/apis/OpenLibraryAPI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/apis/OpenLibraryAPI.ts b/src/api/apis/OpenLibraryAPI.ts index e00c121..c97adf5 100644 --- a/src/api/apis/OpenLibraryAPI.ts +++ b/src/api/apis/OpenLibraryAPI.ts @@ -42,7 +42,7 @@ async searchByTitle(title: string): Promise { englishTitle: result.title_english ?? result.title, year: result.first_publish_year, dataSource: this.apiName, - id: result.cover_edition_key, + id: result.cover_edition_key ?? result.edition_key, } as BookModel) ); }