commit cc5c17a6e1d013626c23ce0399f9167e1f98a4cf
parent c7d05ad2f9ecc0b6ba23ef04993ad037f1938195
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date: Thu, 8 Mar 2018 10:21:45 +0200
Fix embedded items not showing up in the citation dialog.
Regression in 2ad0dc00d, bad fix in 553d2b00. Closes #1448
Diffstat:
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js
@@ -291,10 +291,9 @@ Zotero.Cite = {
* Get an item by ID, either by retrieving it from the library or looking for the document it
* belongs to.
* @param {String|Number|Array} id
- * @param {Boolean} [getZoteroItems=false] - whether to get CSL or Zotero items for embedded items
* @return {Zotero.Item} item
*/
- "getItem":function getItem(id, getZoteroItems=false) {
+ "getItem":function getItem(id) {
var slashIndex;
if(id instanceof Array) {
@@ -303,12 +302,8 @@ Zotero.Cite = {
var sessionID = id.substr(0, slashIndex),
session = Zotero.Integration.sessions[sessionID],
item;
- if(session) {
- if (getZoteroItems) {
- item = session.embeddedZoteroItems[id.substr(slashIndex+1)];
- } else {
- item = session.embeddedItems[id.substr(slashIndex+1)];
- }
+ if (session) {
+ item = session.embeddedZoteroItems[id.substr(slashIndex+1)];
}
if(!item) {
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
@@ -1632,7 +1632,7 @@ Zotero.Integration.Session.prototype.writeDelayedCitation = Zotero.Promise.corou
Zotero.Integration.Session.prototype.getItems = function() {
- return Zotero.Cite.getItem(Object.keys(this.citationsByItemID), true);
+ return Zotero.Cite.getItem(Object.keys(this.citationsByItemID));
}