Sanitize primary fields in setField before comparing to current value
This commit is contained in:
parent
f0aae549c5
commit
20444eceb7
1 changed files with 6 additions and 9 deletions
|
@ -718,8 +718,14 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) {
|
|||
case 'itemTypeID':
|
||||
case 'dateAdded':
|
||||
case 'dateModified':
|
||||
break;
|
||||
|
||||
case 'version':
|
||||
value = parseInt(value);
|
||||
break;
|
||||
|
||||
case 'synced':
|
||||
value = !!value;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -744,15 +750,6 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) {
|
|||
this.setType(value, loadIn);
|
||||
}
|
||||
else {
|
||||
switch (field) {
|
||||
case 'version':
|
||||
value = parseInt(value);
|
||||
break;
|
||||
|
||||
case 'synced':
|
||||
value = !!value;
|
||||
break;
|
||||
}
|
||||
|
||||
this['_' + field] = value;
|
||||
|
||||
|
|
Loading…
Reference in a new issue