From 6ee87056b1e056512a426ba5546eb29255b43310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 11 Feb 2019 10:45:07 +0200 Subject: [PATCH] Fix integration previewFn providing wrong citationsPost data See #1638 --- chrome/content/zotero/xpcom/integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index c30333875f..ac7ce88d1b 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1209,7 +1209,7 @@ Zotero.Integration.Fields.prototype.addEditCitation = async function (field) { for (var prevIdx = idx-1; prevIdx >= 0; prevIdx--) { if (prevIdx in fieldToCitationIdxMapping) break; } - for (var nextIdx = idx+1; nextIdx < fields.length; nextIdx++) { + for (var nextIdx = idx; nextIdx < fields.length; nextIdx++) { if (nextIdx in fieldToCitationIdxMapping) break; } let citationsPre = citations.slice(0, fieldToCitationIdxMapping[prevIdx]+1);