Partial fix for CSL JSON export in translation-server

Zotero.Item doesn't exist in translation-server

Addresses zotero/translation-server#12
This commit is contained in:
Dan Stillman 2017-06-25 04:38:12 -04:00
parent e9a80cb530
commit 56f9f04340

View file

@ -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)
);