From 660548635401a3ee55419728c08d13cabf34979b Mon Sep 17 00:00:00 2001 From: Frank Bennett Date: Fri, 9 May 2014 22:02:48 +0900 Subject: [PATCH] Use ID rather than name on getPrimaryIDForType() Use creator name for comparison (creatorTypeID does not exist on array-form creators) --- chrome/content/zotero/xpcom/utilities.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index d425665cc..dfe0cd6c8 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -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