From 901a10f0b64e8f3a1963d5ee61d7de299c11f1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Fri, 13 Nov 2020 15:17:31 +0200 Subject: [PATCH] Fix note citations being inserted in reverse order --- chrome/content/zotero/xpcom/integration.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 3712b194b8..243d8e9c4c 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1470,6 +1470,7 @@ Zotero.Integration.Session.prototype._insertNoteIntoDocument = async function (f // Do these in reverse order to ensure we don't get messy document edits placeholderIDs.reverse(); + citations.reverse(); let fields = await this._doc.convertPlaceholdersToFields(placeholderIDs, this.data.prefs.noteType, this.data.prefs.fieldType); let insertedCitations = await Promise.all(fields.map(async (field, index) => {