From 0539deb58b2732b2ae2dc449aad25954e8fc4b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 11 Feb 2019 11:01:01 +0200 Subject: [PATCH] Make sure citation edits are not treated as citation duplication --- chrome/content/zotero/xpcom/integration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index ac7ce88d1b..da5f3bd74e 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1602,8 +1602,8 @@ Zotero.Integration.Session.prototype.addCitation = Zotero.Promise.coroutine(func // We need a new ID if there's another citation with the same citation ID in this document var duplicateIndex = this.documentCitationIDs[citation.citationID]; var needNewID = !citation.citationID || duplicateIndex != undefined; - if(needNewID) { - if (duplicateIndex != undefined) { + if (needNewID) { + if (duplicateIndex != undefined && duplicateIndex != index) { // If this is a duplicate, we need to mark both citations as "new" // since we do not know which one was the "original" one // and either one may need to be updated