Skip to content

Commit 1de7192

Browse files
committed
Clear timeouts id in disconnectedCallback
1 parent 99b6ac1 commit 1de7192

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/components/ha-sidebar.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,18 @@ class HaSidebar extends SubscribeMixin(LitElement) {
239239
];
240240
}
241241

242+
public disconnectedCallback() {
243+
super.disconnectedCallback();
244+
// clear timeouts
245+
clearTimeout(this._mouseLeaveTimeout);
246+
clearTimeout(this._tooltipHideTimeout);
247+
clearTimeout(this._touchendTimeout);
248+
// set undefined values
249+
this._mouseLeaveTimeout = undefined;
250+
this._tooltipHideTimeout = undefined;
251+
this._touchendTimeout = undefined;
252+
}
253+
242254
protected render() {
243255
if (!this.hass) {
244256
return nothing;

0 commit comments

Comments
 (0)