Merge pull request #478 from fbennett/fix-csl-export-creators

Fix dropping of creators in CSL JSON export
This commit is contained in:
Dan Stillman 2014-05-10 02:59:56 -04:00
commit 6cf597a08f

View file

@ -1464,13 +1464,14 @@ Zotero.Utilities = {
}
// separate name variables
var authorID = Zotero.CreatorTypes.getPrimaryIDForType(item.itemType);
var authorID = Zotero.CreatorTypes.getPrimaryIDForType(itemTypeID);
var authorFieldName = Zotero.CreatorTypes.getName(authorID);
var creators = item.creators;
if(creators) {
for(var i=0, n=creators.length; i<n; i++) {
var creator = creators[i];
if(creator.creatorTypeID == authorID) {
if(creator.creatorType == authorFieldName) {
var creatorType = "author";
} else {
var creatorType = CSL_NAMES_MAPPINGS[creator.creatorType]