Fix crash in Wikidata preview box
This commit is contained in:
parent
7f829a3578
commit
d7d60da148
1 changed files with 3 additions and 2 deletions
|
@ -138,10 +138,11 @@ export default class WikidataPreviewBox extends VariableUiElement {
|
||||||
|
|
||||||
const key = extraProperty.property
|
const key = extraProperty.property
|
||||||
const display = extraProperty.display
|
const display = extraProperty.display
|
||||||
const value: string[] = Array.from(wikidata.claims.get(key))
|
if (wikidata.claims?.get(key) === undefined) {
|
||||||
if (value === undefined) {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
const value: string[] = Array.from(wikidata.claims.get(key))
|
||||||
|
|
||||||
if (display instanceof Translation) {
|
if (display instanceof Translation) {
|
||||||
els.push(display.Subs({value: value.join(", ")}).SetClass("m-2"))
|
els.push(display.Subs({value: value.join(", ")}).SetClass("m-2"))
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue