Fix note insertion errors when note does not contain citations

This commit is contained in:
Adomas Venčkauskas 2021-08-13 13:17:58 +03:00
parent 9738d20558
commit 5118cd4164

View file

@ -1467,7 +1467,7 @@ Zotero.Integration.Session.prototype.cite = async function (field, addNote=false
let citations = await this._insertCitingResult(fieldIndex, field, io.citation);
if (!this.data.prefs.delayCitationUpdates) {
if (citations.length > 1) {
if (citations.length != 1) {
// We need to refetch fields because we've inserted multiple.
// This is not super optimal, but you're inserting 2+ citations at the time,
// so that sets it off