diff --git a/frontend/app.tsx b/frontend/app.tsx index f503b7ed0..13c934195 100644 --- a/frontend/app.tsx +++ b/frontend/app.tsx @@ -146,6 +146,7 @@ const MUST_LOAD: ResourceName[] = [ ]; export class RawApp extends React.Component { + private _isMounted = false; private get isLoaded() { return (MUST_LOAD.length === intersection(this.props.loaded, MUST_LOAD).length); @@ -156,8 +157,9 @@ export class RawApp extends React.Component { * access into the app, but still warned. */ componentDidMount() { + this._isMounted = true; setTimeout(() => { - if (!this.isLoaded) { + if (this._isMounted && !this.isLoaded) { error(t(Content.APP_LOAD_TIMEOUT_MESSAGE), { title: t("Warning") }); } }, LOAD_TIME_FAILURE_MS); @@ -166,6 +168,10 @@ export class RawApp extends React.Component { warning(t(Content.UNSUPPORTED_BROWSER)); } + componentWillUnmount() { + this._isMounted = false; + } + render() { const syncLoaded = this.isLoaded; const { bot, dispatch, getConfigValue } = this.props;