diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f66f995b4..ce89761e4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [Unreleased] + +### Fixed +- [#1953](https://github.com/plotly/dash/pull/1953) Fix bug [#1783](https://github.com/plotly/dash/issues/1783) in which a failed hot reloader blocks the UI with alerts. + ## [2.2.0] - 2022-02-18 ### Added diff --git a/dash/dash-renderer/src/components/core/Reloader.react.js b/dash/dash-renderer/src/components/core/Reloader.react.js index 3bfa9f41eb..5149558d71 100644 --- a/dash/dash-renderer/src/components/core/Reloader.react.js +++ b/dash/dash-renderer/src/components/core/Reloader.react.js @@ -154,15 +154,16 @@ class Reloader extends React.Component { // Backend code changed - can do a soft reload in place dispatch({type: 'RELOAD'}); } - } else if (reloadRequest.status === 500) { + } else if ( + this.state.intervalId !== null && + reloadRequest.status === 500 + ) { if (this._retry > this.state.max_retry) { this.clearInterval(); // Integrate with dev tools ui?! window.alert( - ` - Reloader failed after ${this._retry} times. - Please check your application for errors. - ` + `Hot reloading is disabled after failing ${this._retry} times. ` + + 'Please check your application for errors, then refresh the page.' ); } this._retry++;