diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts
index e265528e95..3450640260 100644
--- a/api/js/etemplate/Et2Tree/Et2Tree.ts
+++ b/api/js/etemplate/Et2Tree/Et2Tree.ts
@@ -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=${