Don't skip base fields that are mapped to a field with the same name
This commit is contained in:
parent
dcfdf27c0b
commit
bdeff96162
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue