Fixes #168, Properly adjust index when skipping empty creators

This commit is contained in:
Simon Kornblith 2012-09-21 19:49:27 -04:00
parent 387e9e4fc0
commit df6426af2e

View file

@ -401,6 +401,7 @@ Zotero.Translate.ItemSaver.prototype = {
},
"_saveCreators":function(item, newItem) {
var creatorIndex = 0;
for(var i=0; i<item.creators.length; i++) {
var creator = item.creators[i];
@ -451,7 +452,7 @@ Zotero.Translate.ItemSaver.prototype = {
var creatorID = creator.save();
}
newItem.setCreator(i, creator, creatorTypeID);
newItem.setCreator(creatorIndex++, creator, creatorTypeID);
}
},