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 display = extraProperty.display
|
||||
const value: string[] = Array.from(wikidata.claims.get(key))
|
||||
if (value === undefined) {
|
||||
if (wikidata.claims?.get(key) === undefined) {
|
||||
continue
|
||||
}
|
||||
const value: string[] = Array.from(wikidata.claims.get(key))
|
||||
|
||||
if (display instanceof Translation) {
|
||||
els.push(display.Subs({value: value.join(", ")}).SetClass("m-2"))
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue