what if there\'s no categories\?

This commit is contained in:
David 2017-05-14 16:07:44 -04:00
parent 9b29df1eab
commit faa0a42b05
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ function normalizeGoogleData(book) {
"isbn-10": _.find(book.industryIdentifiers, { type: "ISBN_10" }).identifier || '',
"isbn-13": _.find(book.industryIdentifiers, { type: "ISBN_13" }).identifier || '',
format: '',
genre: book.categories[0],
genre: book.categories ? book.categories[0] : '',
publisher: _.trim(book.publisher, '"'),
series: '',
volume: '',