Don't break integration if setting document preferences on a document on which set document preferences has already been run, but which has no fields. (Thanks to Frank for spotting this.)
This commit is contained in:
parent
74d5fc6a84
commit
77f27ff3d3
|
@ -767,6 +767,8 @@ Zotero.Integration.Document.prototype.setDocPrefs = function() {
|
|||
Zotero.Integration.complete(me._doc);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
Zotero.Integration.complete(me._doc);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -1193,6 +1195,7 @@ Zotero.Integration.Fields.prototype._updateDocument = function(forceCitations, f
|
|||
// For ReferenceMarks with formatting, we need to set the text again, because
|
||||
// setting the field code removes formatting from the mark. I don't like this.
|
||||
field.setText(formattedCitation, isRich);
|
||||
Zotero.debug("Setting text again");
|
||||
}
|
||||
}
|
||||
nUpdated++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user