From 9e1533c32dedaca74c533811b24d232eb23cb0b2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 28 Apr 2017 04:07:27 -0400 Subject: [PATCH] Fix error with citations not in library (since f3ceb7f66) --- chrome/content/zotero/xpcom/integration.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 0a1130260..597ee4a8a 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -2480,8 +2480,13 @@ Zotero.Integration.Session.prototype.lookupItems = Zotero.Promise.coroutine(func } if(zoteroItem) { - items.push(zoteroItem); - citationItem.id = zoteroItem.cslItemID ? zoteroItem.cslItemID : zoteroItem.id; + if (zoteroItem.cslItemID) { + citationItem.id = zoteroItem.cslItemID; + } + else { + citationItem.id = zoteroItem.id; + items.push(zoteroItem); + } } }