Et2Select: Fix selection of first option when no value provided, broken by 134cd9d249

This commit is contained in:
nathan 2023-05-10 09:19:02 -06:00
parent e296fd21a2
commit 471a5a60b9

View File

@ -455,8 +455,8 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
return;
}
// Multiple is allowed to be empty, and if we don't have an emptyLabel nothing to do
if(this.multiple || !this.emptyLabel)
// Multiple is allowed to be empty, and if we don't have an emptyLabel or options nothing to do
if(this.multiple || (!this.emptyLabel && this.select_options.length === 0))
{
return;
}