Fix et2container.getValueById() failed with error on (some) webcomponents

This commit is contained in:
nathan 2023-04-19 11:30:37 -06:00
parent 286461eac3
commit 61deaad2a2

View File

@ -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;
}
/**