From 3c3ff3285405e28809b75fb4cb293b68e577204c Mon Sep 17 00:00:00 2001 From: Dan Stillman <dstillman@zotero.org> Date: Wed, 12 Apr 2017 05:41:56 -0400 Subject: [PATCH] Better debug output when setting .synced on an item --- chrome/content/zotero/xpcom/data/item.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index fdb8f8076..4c1713975 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -704,12 +704,18 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) { */ // If field value has changed - if (this['_' + field] === value && field != 'synced') { - Zotero.debug("Field '" + field + "' has not changed", 4); - return false; + if (this['_' + field] === value) { + if (field == 'synced') { + Zotero.debug("Setting synced to " + value); + } + else { + Zotero.debug("Field '" + field + "' has not changed", 4); + return false; + } + } + else { + Zotero.debug("Field '" + field + "' has changed from '" + this['_' + field] + "' to '" + value + "'", 4); } - - Zotero.debug("Field '" + field + "' has changed from '" + this['_' + field] + "' to '" + value + "'", 4); // Save a copy of the field before modifying this._markFieldChange(field, this['_' + field]);