Fix js error happens when there's no label set on select options

This commit is contained in:
hadi 2023-08-28 12:17:42 +02:00
parent 1284ab534f
commit b33f0fa8cf

View File

@ -729,7 +729,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
tag = <Et2Tag>document.createElement(this.tagTag);
}
tag.value = item.value;
tag.textContent = item.getTextLabel().trim();
tag.textContent = item?.getTextLabel()?.trim();
tag.class = item.classList.value + " search_tag";
tag.setAttribute("exportparts", "icon");
if(this.size)