Commit c6f9fde7 authored by Tobinsk's avatar Tobinsk
Browse files

Resolve "Missing names"

parent 35eff0fb
......@@ -195,8 +195,16 @@ class WikidataNormalizerTransformer extends Transform {
if (name2 !== null) {
return name2;
}
const name3 = this.getAlternativNames(obj)[0];
if (name3 !== null) {
return name3;
}
// this often fails. Then we use null from the catch
const lang = Object.keys(obj.labels)[0];
return obj.labels[lang].value;
return this.getAlternativNames(obj)[0];
} catch (error) {
return null;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment