Skip to content
Permalink
Browse files

don't fail on non-existing extraFields

  • Loading branch information...
adam3smith committed Jan 31, 2019
1 parent 27eb086 commit 5134dceecb39aa7567a9cad9d0c02d503fb7b45a
Showing with 5 additions and 3 deletions.
  1. +5 −3 BibLaTeX.js
@@ -15,7 +15,7 @@
"exportFileData": false,
"useJournalAbbreviation": false
},
"lastUpdated": "2019-01-30 17:16:00"
"lastUpdated": "2019-01-31 13:16:00"
}

//%a = first listed creator surname
@@ -387,8 +387,10 @@ function creatorCheck(item, ctype) {
}

function buildCiteKey (item, extraFields, citekeys) {
const citationKey = extraFields.findIndex(field => field.field && field.value && field.field.toLowerCase() === 'citation key')
if (citationKey >= 0) return extraFields.splice(citationKey, 1)[0].value
if (extraFields) {
const citationKey = extraFields.findIndex(field => field.field && field.value && field.field.toLowerCase() === 'citation key')
if (citationKey >= 0) return extraFields.splice(citationKey, 1)[0].value;
}

if (item.citationKey) return item.citationKey

0 comments on commit 5134dce

Please sign in to comment.
You can’t perform that action at this time.