Skip to content

Commit

Permalink
Cancels page retry loop with negative intervals. (#22983)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
RubenNL authored Nov 25, 2024
1 parent 2d3579c commit a525c44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/layouts/ha-init-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class HaInitPage extends LitElement {
}

private _retry() {
if (this._retryInterval) {
clearInterval(this._retryInterval);
}
location.reload();
}

Expand Down

0 comments on commit a525c44

Please sign in to comment.