www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 660548635401a3ee55419728c08d13cabf34979b
parent ebb112890d5569def5064789439e4f1dba6f33fd
Author: Frank Bennett <biercenator@gmail.com>
Date:   Fri,  9 May 2014 22:02:48 +0900

Use ID rather than name on getPrimaryIDForType()

Use creator name for comparison (creatorTypeID does not exist on array-form creators)

Diffstat:
Mchrome/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 @@ -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]