Skip to content
Permalink
Browse files

Wikidata.js -- fix eslint warnings

  • Loading branch information...
retorquere committed Feb 25, 2019
1 parent 940db2e commit 67f69d1a418ddcc7b5a2bc47b0fa16013956bf2c
Showing with 3 additions and 3 deletions.
  1. +3 −3 Wikidata.js
@@ -119,7 +119,7 @@ var creatorMapping = {
'wdt:P57': 'director',
'wdt:P58': 'scriptwriter',
'wdt:P162': 'producer'
}
};


var namespaces = {
@@ -232,7 +232,7 @@ function scrape(doc, url) {
item.creators.push(ZU.cleanAuthor(aut[0], aut[1]));
}
//in Zotero we cannot allow multiple DOIs
if (item.DOI && item.DOI.indexOf(', ')>-1) {
if (item.DOI && item.DOI.includes(', ')) {
item.DOI = ZU.xpathText(xml, '(//rdf:Description[wikibase:rank[contains(@rdf:resource, "#PreferredRank")]]/ps:P356)[1]', namespaces)
|| ZU.xpathText(xml, '(//rdf:Description[wikibase:rank[contains(@rdf:resource, "#NormalRank")]]/ps:P356)[1]', namespaces)
|| ZU.xpathText(xml, '(//rdf:Description[wikibase:rank[contains(@rdf:resource, "#DeprecatedRank")]]/ps:P356)[1]', namespaces);
@@ -649,5 +649,5 @@ var testCases = [
}
]
}
]
];
/** END TEST CASES **/

0 comments on commit 67f69d1

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