Ensure that document refresh doesn't perform needless text writes

This commit is contained in:
Adomas Venčkauskas 2018-03-14 15:27:10 +02:00
parent 92346c8fb9
commit 25d8898ab0

View file

@ -1007,8 +1007,8 @@ Zotero.Integration.Fields.prototype._updateDocument = async function(forceCitati
var plainCitation = citation.properties.plainCitation && citationField.getText(); var plainCitation = citation.properties.plainCitation && citationField.getText();
// Update citation text: // Update citation text:
// If we're not specifically *not* trying to regen text // If we're looking to reset the text even if it matches previous text
if (forceCitations != FORCE_CITATIONS_FALSE if (forceCitations == FORCE_CITATIONS_RESET_TEXT
// Or metadata has changed thus changing the formatted citation // Or metadata has changed thus changing the formatted citation
|| (citation.properties.formattedCitation !== formattedCitation)) { || (citation.properties.formattedCitation !== formattedCitation)) {