Fix note citations being inserted in reverse order

This commit is contained in:
Adomas Venčkauskas 2020-11-13 15:17:31 +02:00 committed by Dan Stillman
parent 50bef8dffe
commit 901a10f0b6

View file

@ -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) => {