Graciously handle multiple entries in wikidata for fetching images and showing articles, verious bug fixes
This commit is contained in:
parent
8d52ef1106
commit
a996ba2a7c
14 changed files with 231 additions and 90 deletions
|
@ -47,7 +47,7 @@ export default class Wikidata {
|
|||
const claimsList: any[] = entity.claims[claimId]
|
||||
const values = new Set<string>()
|
||||
for (const claim of claimsList) {
|
||||
const value = claim.mainsnak?.datavalueq?.value;
|
||||
const value = claim.mainsnak?.datavalue?.value;
|
||||
if(value !== undefined){
|
||||
values.add(value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue