From 6fe3ef27d48cbdb88748cea5d30faa10067f3ec4 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 7 Feb 2012 18:15:28 -0500 Subject: [PATCH] Screw with the way we handle citation IDs instead of indices, since that's closer to the root of the problem --- chrome/content/zotero/xpcom/integration.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index ad1b3285a..661f08d66 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1863,7 +1863,6 @@ Zotero.Integration.Session = function(doc) { this.uncitedItems = {}; this.omittedItems = {}; this.embeddedItems = {}; - this.newIndices = {}; this.embeddedZoteroItems = {}; this.embeddedZoteroItemsByURI = {}; this.customBibliographyText = {}; @@ -1882,6 +1881,7 @@ Zotero.Integration.Session.prototype.resetRequest = function(doc) { this.bibliographyDataHasChanged = false; this.updateItemIDs = {}; this.updateIndices = {}; + this.newIndices = {}; this.oldCitationIDs = this.citationIDs; @@ -2131,7 +2131,6 @@ Zotero.Integration.Session.prototype.addCitation = function(index, noteIndex, ar this.updateIndices[index] = true; } Zotero.debug("Integration: Adding citationID "+citation.citationID); - this.citationIDs[citation.citationID] = true; } /** @@ -2514,9 +2513,7 @@ Zotero.Integration.Session.prototype.updateCitations = function(callback) { if(this.formatCitation(index, citation)) { this.bibliographyHasChanged = true; } - if(!this.citationIDs[citation.citationID]) { - this.citationIDs[citation.citationID] = citation; - } + this.citationIDs[citation.citationID] = true; delete this.newIndices[index]; yield true; }