mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-15 03:01:19 +01:00
Fix legacy et2_createWidget() did not properly load webComponents when they had "et2-<tag>"
This commit is contained in:
parent
5ab1aaf80c
commit
26d2ea4616
@ -97,10 +97,17 @@ export function et2_createWidget(_name: string, _attrs: object, _parent?: any):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check and return web-components in case widget is no longer available as legacy widget
|
// check and return web-components in case widget is no longer available as legacy widget
|
||||||
if (typeof et2_registry[_name] === "undefined" && window.customElements.get('et2-'+_name))
|
if(typeof et2_registry[_name] === "undefined")
|
||||||
|
{
|
||||||
|
if(window.customElements.get('et2-' + _name))
|
||||||
{
|
{
|
||||||
return loadWebComponent('et2-' + _name, _attrs, _parent);
|
return loadWebComponent('et2-' + _name, _attrs, _parent);
|
||||||
}
|
}
|
||||||
|
else if(window.customElements.get(_name))
|
||||||
|
{
|
||||||
|
return loadWebComponent(_name, _attrs, _parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Parse the "readonly" and "type" flag for this element here, as they
|
// Parse the "readonly" and "type" flag for this element here, as they
|
||||||
// determine which constructor is used
|
// determine which constructor is used
|
||||||
|
Loading…
Reference in New Issue
Block a user