From f3ceb7f66e0caa2e46448e92323c2390b13e855c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 19 Apr 2017 04:24:34 -0400 Subject: [PATCH] Load object data when looking up integration items Item data may not have been loaded for a library when requesting an item from a document (e.g., for Refresh), so we need to load all data for requested items to avoid unloaded-data errors. (Data isn't loaded if it's already been loaded, so hopefully this doesn't slow things down too much.) --- chrome/content/zotero/xpcom/integration.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 643880840b..fba259f002 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -2386,6 +2386,8 @@ Zotero.Integration.Session.prototype.addCitation = Zotero.Promise.coroutine(func * Throws a MissingItemException if item was not found. */ Zotero.Integration.Session.prototype.lookupItems = Zotero.Promise.coroutine(function* (citation, index) { + let items = []; + for(var i=0, n=citation.citationItems.length; i