From 77f27ff3d3fcb93ca3fc631dc18101b30e5cab2f Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 28 Sep 2011 21:48:04 +0000 Subject: [PATCH] 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.) --- chrome/content/zotero/xpcom/integration.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index c174a9c9a3..4c0617eb25 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -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++;