diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 5a509109b..6b7995221 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -312,21 +312,21 @@ var Zotero_QuickFormat = new function () { Zotero.debug("Searched cited items"); } - _updateItemList(citedItemsMatchingSearch, searchResultIDs, isAsync); + _updateItemList(citedItems, citedItemsMatchingSearch, searchResultIDs, isAsync); }); if(!completed) { // We are going to have to wait until items have been retrieved from the document. // Until then, show item list without cited items. Zotero.debug("Getting cited items asynchronously"); - _updateItemList(false, searchResultIDs); + _updateItemList(false, false, searchResultIDs); isAsync = true; } else { Zotero.debug("Got cited items synchronously"); } } else { // No search conditions, so just clear the box - _updateItemList([], []); + _updateItemList([], [], []); } } @@ -347,7 +347,7 @@ var Zotero_QuickFormat = new function () { /** * Updates the item list */ - function _updateItemList(citedItems, searchResultIDs, preserveSelection) { + function _updateItemList(citedItems, citedItemsMatchingSearch, searchResultIDs, preserveSelection) { var selectedIndex = 1, previousItemID; // Do this so we can preserve the selected item after cited items have been loaded @@ -365,13 +365,8 @@ var Zotero_QuickFormat = new function () { selectedIndex = 2; } else if(citedItems.length) { // We have cited items - referenceBox.appendChild(_buildListSeparator(Zotero.getString("integration.cited"))); for(var i=0, n=citedItems.length; i