From 1d48b2e8cb105594a4258e91edd6371f0332b84e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 20 Sep 2009 03:12:15 +0000 Subject: [PATCH] Fix error on Google Books when there's no publisher --- translators/Google Books.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/translators/Google Books.js b/translators/Google Books.js index 6fa894bff3..000448c080 100644 --- a/translators/Google Books.js +++ b/translators/Google Books.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2009-06-04 01:10:00" + "lastUpdated":"2009-09-20 03:15:00" } @@ -97,7 +97,9 @@ function doWeb(doc, url) { } newItem.ISBN = ISBN; - newItem.publisher = xml.publisher[0].toString(); + if (xml.publisher[0]) { + newItem.publisher = xml.publisher[0].toString(); + } newItem.title = xml.title[0].toString();