Fix removing codes by pressing "No" in reselect item dialog with Word for Mac

This commit is contained in:
Simon Kornblith 2012-04-20 11:53:28 -04:00
parent 8342aafa39
commit 8faf011b2d

View file

@ -1681,11 +1681,12 @@ Zotero.Integration.Fields.prototype._updateDocument = function(forceCitations, f
}
// do this operations in reverse in case plug-ins care about order
this._deleteFields.sort();
var sortClosure = function(a, b) { return a-b; };
this._deleteFields.sort(sortClosure);
for(var i=(this._deleteFields.length-1); i>=0; i--) {
this._fields[this._deleteFields[i]].delete();
}
this._removeCodeFields.sort();
this._removeCodeFields.sort(sortClosure);
for(var i=(this._removeCodeFields.length-1); i>=0; i--) {
this._fields[this._removeCodeFields[i]].removeCode();
}