what if there\'s no categories\?

This commit is contained in:
David 2017-05-14 16:07:44 -04:00
parent 9b29df1eab
commit faa0a42b05

View File

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