From aded6898318ff153a14c2da51a472d6cde581483 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 19 Apr 2023 11:30:37 -0600 Subject: [PATCH] Fix et2container.getValueById() failed with error on (some) webcomponents --- api/js/etemplate/et2_core_baseWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_core_baseWidget.ts b/api/js/etemplate/et2_core_baseWidget.ts index 675e5ee124..35467ded42 100644 --- a/api/js/etemplate/et2_core_baseWidget.ts +++ b/api/js/etemplate/et2_core_baseWidget.ts @@ -436,13 +436,13 @@ export class et2_container extends et2_baseWidget // Don't care about what class it is, just that it has the function // @ts-ignore - if(typeof widget.get_value !== 'function') + if(typeof widget.get_value !== 'function' && typeof widget.value == "undefined") { throw 'Widget ' + id + ' does not have a get_value() function'; } // @ts-ignore - return widget.get_value(); + return typeof widget.get_value == "function" ? widget.get_value() : widget.value; } /**