commit 56f9f04340685edc6d0e2145a655b3cc2eba46fc
parent e9a80cb5303ba006bdd29a6ccdf368593a8776cd
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 25 Jun 2017 04:38:12 -0400
Partial fix for CSL JSON export in translation-server
Zotero.Item doesn't exist in translation-server
Addresses zotero/translation-server#12
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -1660,7 +1660,9 @@ Zotero.Utilities = {
"itemToCSLJSON":function(zoteroItem) {
// If a Zotero.Item was passed, convert it to the proper format (skipping child items) and
// call this function again with that object
- if (zoteroItem instanceof Zotero.Item) {
+ //
+ // (Zotero.Item won't be defined in translation-server)
+ if (typeof Zotero.Item !== 'undefined' && zoteroItem instanceof Zotero.Item) {
return this.itemToCSLJSON(
Zotero.Utilities.Internal.itemToExportFormat(zoteroItem, false, true)
);