From 93c390139bf67d763a06fe47dab768fbe0de1ff7 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 26 Jul 2021 10:10:30 +0200 Subject: [PATCH] Fix error TypeError: Cannot read property 'length' of undefined --- api/js/etemplate/et2_widget_taglist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_taglist.ts b/api/js/etemplate/et2_widget_taglist.ts index 5a91785e6b..b29c261105 100644 --- a/api/js/etemplate/et2_widget_taglist.ts +++ b/api/js/etemplate/et2_widget_taglist.ts @@ -638,7 +638,7 @@ export class et2_taglist extends et2_selectbox implements et2_IResizeable }); // if value has already been set, re-set it by it's id(s) - if (this.options.select_options.length && this.options.value.length) { + if (this.options.select_options.length && this.options.value?.length) { this.set_value(this.options.value.map((v) => v.id)); } }