Fix moving items to trash (from bf36a988e4)

This commit is contained in:
Dan Stillman 2015-03-16 23:50:24 -04:00
parent bdd69d0a53
commit d50b6667f0

View file

@ -77,7 +77,6 @@ Zotero.Item = function(itemTypeOrID) {
this._fileExists = null; this._fileExists = null;
this._deleted = null; this._deleted = null;
this._publication = null;
this._hasNote = null; this._hasNote = null;
this._noteAccessTime = null; this._noteAccessTime = null;
@ -1057,8 +1056,8 @@ Zotero.Item.prototype.removeCreator = function(orderIndex, allowMissing) {
} }
// Define 'deleted' and 'publication' properties // Define 'deleted' property (and any others that follow the same pattern in the future)
for (let name of ['deleted', 'publication']) { for (let name of ['deleted']) {
let prop = '_' + name; let prop = '_' + name;
Zotero.defineProperty(Zotero.Item.prototype, name, { Zotero.defineProperty(Zotero.Item.prototype, name, {
@ -1079,7 +1078,7 @@ for (let name of ['deleted', 'publication']) {
+ " state hasn't changed for item " + this.id); + " state hasn't changed for item " + this.id);
return; return;
} }
this._markFieldChange('publication', !!this[prop]); this._markFieldChange(name, !!this[prop]);
this._changed[name] = true; this._changed[name] = true;
this[prop] = val; this[prop] = val;
} }