Et2Tree: Avoid error if onclick property was not set

This commit is contained in:
nathan 2024-02-13 10:41:27 -07:00
parent 51f23a0dcf
commit cf8de8f108

View File

@ -622,8 +622,10 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
this._currentOption = this.getNode(event.detail.selection[0].id);
event.detail.previous = this._previousOption.id;
this._currentSlTreeItem = event.detail.selection[0];
this.onclick(event.detail.selection[0].id, this, event.detail.previous)
if(typeof this.onclick == "function")
{
this.onclick(event.detail.selection[0].id, this, event.detail.previous)
}
}
}
@sl-expand=${