Skip to content

Commit e89bf8e

Browse files
committed
Added fallback if there is no default cover
1 parent cf36d19 commit e89bf8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/apis/OpenLibraryAPI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async searchByTitle(title: string): Promise<MediaTypeModel[]> {
4242
englishTitle: result.title_english ?? result.title,
4343
year: result.first_publish_year,
4444
dataSource: this.apiName,
45-
id: result.cover_edition_key,
45+
id: result.cover_edition_key ?? result.edition_key,
4646
} as BookModel)
4747
);
4848
}

0 commit comments

Comments
 (0)