Commit 374e30ec authored by Tobias Steiner's avatar Tobias Steiner
Browse files

If typology is undefined return null

parent b71c0f33
......@@ -161,7 +161,8 @@ class WikiNormalizer extends Transform {
// Check for geographical instances
return obj.claims.P31.map((instanceOf) => {
try {
return instanceOf.mainsnak.datavalue.value.id || null;
return typeof instanceOf.mainsnak.datavalue.value.id === 'undefined' ?
null : instanceOf.mainsnak.datavalue.value.id;
} catch (err) {}
});
}
......
Supports Markdown
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