mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Don't break everything if something goes wrong cloning webcomponent for nm row
This commit is contained in:
parent
54b2ac54b1
commit
3c6c2aec1a
@ -180,6 +180,11 @@ export class et2_nextmatch_rowProvider
|
||||
if(typeof window.customElements.get(widget.localName) != "undefined")
|
||||
{
|
||||
widget = this._cloneWebComponent(entry, row, data);
|
||||
if(!widget)
|
||||
{
|
||||
console.warn("Error cloning ", entry);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -274,6 +279,11 @@ export class et2_nextmatch_rowProvider
|
||||
// Use the clone, not the original
|
||||
let widget = entry.nodeFuncs[0](row);
|
||||
|
||||
if(!widget || widget.localName !== entry.widget.localName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Need to set the parent to the nm or egw() (and probably others) will not be as expected, using window instead
|
||||
// of app. arrayMgrs are fine without this though
|
||||
widget._parent = this._context;
|
||||
|
Loading…
Reference in New Issue
Block a user