Cancels page retry loop with negative intervals. (#22983)

* Cancels page retry loop with negative intervals.
This shouldn't be required, but sometimes, which I can't easily reproduce, it fails to reload.
Fixes #20052

* Clear interval before reload.
This commit is contained in:
Ruben van Dijk 2024-11-25 13:43:27 +01:00 committed by GitHub
parent 2d3579c08a
commit a525c44794
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,9 @@ class HaInitPage extends LitElement {
}
private _retry() {
if (this._retryInterval) {
clearInterval(this._retryInterval);
}
location.reload();
}