Better debug output when setting .synced on an item
This commit is contained in:
parent
4da0c4c1fc
commit
3c3ff32854
1 changed files with 11 additions and 5 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Reference in a new issue