forked from MapComplete/MapComplete
		
	Ignore wikidata claims without datavalue
This commit is contained in:
		
							parent
							
								
									b5d2b99ced
								
							
						
					
					
						commit
						8d52ef1106
					
				
					 3 changed files with 1860 additions and 8 deletions
				
			
		|  | @ -47,8 +47,10 @@ export default class Wikidata { | |||
|             const claimsList: any[] = entity.claims[claimId] | ||||
|             const values = new Set<string>() | ||||
|             for (const claim of claimsList) { | ||||
|                 const value = claim.mainsnak.datavalue.value; | ||||
|                 values.add(value) | ||||
|                 const value = claim.mainsnak?.datavalueq?.value; | ||||
|                 if(value !== undefined){ | ||||
|                     values.add(value) | ||||
|                 } | ||||
|             } | ||||
|             claims.set(claimId, values); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue