Et2LinkSearch: Avoid error if title couldn't be found

This commit is contained in:
nathan 2022-08-04 16:25:44 -06:00
parent b88ce18639
commit fb94a47df1

View File

@ -114,7 +114,7 @@ export class Et2LinkSearch extends Et2Select
this.select_options = Object.assign([option], this.__select_options); this.select_options = Object.assign([option], this.__select_options);
this.egw()?.link_title(this.app, option.value, true).then(title => this.egw()?.link_title(this.app, option.value, true).then(title =>
{ {
option.label = title; option.label = title || Et2Link.MISSING_TITLE;
option.class = ""; option.class = "";
// It's probably already been rendered, find the item // It's probably already been rendered, find the item
let item = this.getItems().find(i => i.value === option.value); let item = this.getItems().find(i => i.value === option.value);