Fixed: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'

This commit is contained in:
Alexandros Sigalas 2024-08-08 00:12:07 +03:00 committed by Ralf Becker
parent 7c1b156c2c
commit 044189a2ed

View File

@ -349,7 +349,7 @@ export abstract class et2_DOMWidget extends et2_widget implements et2_IDOMNode
{ {
// Find the tab by DOM heritage // Find the tab by DOM heritage
// @ts-ignore // @ts-ignore
if(tabbox.tabData[i].contentDiv?.contains(this.div[0] || this)) if( (typeof this.div[0] === 'Node' || typeof this === 'Node') && tabbox.tabData[i].contentDiv?.contains(this.div[0] || this))
{ {
return tabbox.tabData[i]; return tabbox.tabData[i];
} }