diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 0156641674..52798da2dc 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -563,8 +563,8 @@ export const Et2WithSearchMixin = >(superclass // We catch all change events, then call this._oldChange only when value changes this.removeEventListener("change", this._oldChange); - this._searchInputNode.removeEventListener("change", this._searchInputNode.handleChange); - this._searchInputNode.addEventListener("change", this._handleSearchChange); + this._searchInputNode?.removeEventListener("change", this._searchInputNode.handleChange); + this._searchInputNode?.addEventListener("change", this._handleSearchChange); }); }