Skip to content

Commit 197e3ca

Browse files
committed
Clear timeouts id in disconnectedCallback
1 parent 0847deb commit 197e3ca

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
@@ -248,6 +248,18 @@ class HaSidebar extends SubscribeMixin(LitElement) {
248248
];
249249
}
250250

251+
public disconnectedCallback() {
252+
super.disconnectedCallback();
253+
// clear timeouts
254+
clearTimeout(this._mouseLeaveTimeout);
255+
clearTimeout(this._tooltipHideTimeout);
256+
clearTimeout(this._touchendTimeout);
257+
// set undefined values
258+
this._mouseLeaveTimeout = undefined;
259+
this._tooltipHideTimeout = undefined;
260+
this._touchendTimeout = undefined;
261+
}
262+
251263
protected render() {
252264
if (!this.hass) {
253265
return nothing;

0 commit comments

Comments
 (0)