Use ID rather than name on getPrimaryIDForType()
Use creator name for comparison (creatorTypeID does not exist on array-form creators)
This commit is contained in:
parent
ebb112890d
commit
6605486354
1 changed files with 3 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue