Don't throw an exception when an invalid wikidata entry is encountered

This commit is contained in:
pietervdvn 2022-04-28 00:30:27 +02:00
parent 861b9a3cdd
commit 27f12b1f9d

View file

@ -362,7 +362,7 @@ export default class Wikidata {
const id = Wikidata.ExtractKey(value)
if (id === undefined) {
console.warn("Could not extract a wikidata entry from", value)
throw "Could not extract a wikidata entry from " + value
return undefined
}
const url = "https://www.wikidata.org/wiki/Special:EntityData/" + id + ".json";