Merge pull request #274 from aurimasv/newItem-fix

Unbreak adding new items
This commit is contained in:
Simon Kornblith 2013-03-18 23:08:39 -07:00
commit 69d35f97b0

View File

@ -590,8 +590,8 @@ Zotero.Item.prototype.setType = function(itemTypeID, loadIn) {
if (loadIn) {
this._itemDataLoaded = false;
}
else if(oldItemTypeID) {
this._markFieldChange('itemType', Zotero.ItemTypes.getName(oldItemTypeID));
else {
if(oldItemTypeID) this._markFieldChange('itemType', Zotero.ItemTypes.getName(oldItemTypeID));
if (!this._changedPrimaryData) {
this._changedPrimaryData = {};
}