www

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

commit c4cd7ce3e0a54ceaf6221d0310aeac3afa2c5e9b
parent bb15336fdb23ec3441ec9cceb8ff9ab0a7019acc
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Tue,  4 Aug 2015 15:19:33 -0500

Fix import of computerProgram exported as CSL JSON

Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1668,8 +1668,13 @@ Zotero.Utilities = { if(variable in cslItem) { var textMappings = CSL_TEXT_MAPPINGS[variable]; for(var i=0; i<textMappings.length; i++) { - var field = textMappings[i], - fieldID = Zotero.ItemFields.getID(field); + var field = textMappings[i]; + + // Until 5.0, use version instead of versionNumber + if (field == 'versionNumber') field = 'version'; + + var fieldID = Zotero.ItemFields.getID(field); + if(Zotero.ItemFields.isBaseField(fieldID)) { var newFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, fieldID); if(newFieldID) fieldID = newFieldID;