commit 6cf597a08f795aa6452e398e030594c418bb7452 parent fd9452adbc1fa6966822ac5b1e647b9e8f624445 Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 10 May 2014 02:59:56 -0400 Merge pull request #478 from fbennett/fix-csl-export-creators Fix dropping of creators in CSL JSON export Diffstat:
| M | 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 @@ -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]