Don't skip base fields that are mapped to a field with the same name

This commit is contained in:
Simon Kornblith 2012-10-03 17:54:21 -04:00
parent dcfdf27c0b
commit bdeff96162
2 changed files with 2 additions and 2 deletions

View file

@ -388,7 +388,7 @@ Zotero.Translate.ItemSaver.prototype = {
// Skip mapping if item field already exists
var fieldName = Zotero.ItemFields.getName(fieldID);
if(item[fieldName]) continue;
if(fieldName !== field && item[fieldName]) continue;
if(fieldID) {
Zotero.debug("Translate: Mapping "+field+" to "+fieldName, 5);

View file

@ -1264,7 +1264,7 @@ Zotero.Utilities = {
if((itemFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(typeID, fieldID))) {
var fieldName = Zotero.ItemFields.getName(itemFieldID);
// Only map if item field does not exist
if(!newItem[fieldName]) newItem[fieldName] = val;
if(fieldName !== field && !newItem[fieldName]) newItem[fieldName] = val;
continue; // already know this is valid
}