Fixed bug in OpenLibraryAPI when no isbn was present
This commit is contained in:
parent
8bb8c2d791
commit
99bf06dda9
1 changed files with 2 additions and 2 deletions
|
|
@ -70,8 +70,8 @@ export class OpenLibraryAPI extends APIModel {
|
|||
dataSource: this.apiName,
|
||||
url: `https://openlibrary.org` + result.key,
|
||||
id: result.key,
|
||||
isbn: result.isbn.find((el: string | any[]) => el.length <= 10) ?? 'unknown',
|
||||
isbn13: result.isbn.find((el: string | any[]) => el.length == 13) ?? 'unknown',
|
||||
isbn: (result.isbn ?? []).find((el: string | any[]) => el.length <= 10) ?? 'unknown',
|
||||
isbn13: (result.isbn ?? []).find((el: string | any[]) => el.length == 13) ?? 'unknown',
|
||||
englishTitle: result.title_english ?? result.title,
|
||||
|
||||
author: result.author_name ?? 'unknown',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue