From faa0a42b0531406b895a9edc1c152b69549a6d15 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sun, 14 May 2017 16:07:44 -0400 Subject: [PATCH] what if there\'s no categories\? --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6816c9f..68916cb 100644 --- a/index.js +++ b/index.js @@ -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: '',