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:
Simon Kornblith 2011-09-28 21:48:04 +00:00
parent 74d5fc6a84
commit 77f27ff3d3

View File

@ -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++;