Fix import of computerProgram exported as CSL JSON
This commit is contained in:
parent
bb15336fdb
commit
c4cd7ce3e0
1 changed files with 7 additions and 2 deletions
|
@ -1668,8 +1668,13 @@ Zotero.Utilities = {
|
||||||
if(variable in cslItem) {
|
if(variable in cslItem) {
|
||||||
var textMappings = CSL_TEXT_MAPPINGS[variable];
|
var textMappings = CSL_TEXT_MAPPINGS[variable];
|
||||||
for(var i=0; i<textMappings.length; i++) {
|
for(var i=0; i<textMappings.length; i++) {
|
||||||
var field = textMappings[i],
|
var field = textMappings[i];
|
||||||
fieldID = Zotero.ItemFields.getID(field);
|
|
||||||
|
// Until 5.0, use version instead of versionNumber
|
||||||
|
if (field == 'versionNumber') field = 'version';
|
||||||
|
|
||||||
|
var fieldID = Zotero.ItemFields.getID(field);
|
||||||
|
|
||||||
if(Zotero.ItemFields.isBaseField(fieldID)) {
|
if(Zotero.ItemFields.isBaseField(fieldID)) {
|
||||||
var newFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, fieldID);
|
var newFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, fieldID);
|
||||||
if(newFieldID) fieldID = newFieldID;
|
if(newFieldID) fieldID = newFieldID;
|
||||||
|
|
Loading…
Reference in a new issue