diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js index 60519369f8d215bb4cbf01c2487896522b2035be..309df431dd49b67f4dc3bd2cbca5f0d3dfb4562a 100644 --- a/app/features/conference/components/Conference.js +++ b/app/features/conference/components/Conference.js @@ -91,6 +91,7 @@ class Conference extends Component<Props, State> { this._ref = React.createRef(); + this._navigateToHome = this._navigateToHome.bind(this); this._onIframeLoad = this._onIframeLoad.bind(this); } @@ -110,7 +111,7 @@ class Conference extends Component<Props, State> { script.async = true; script.onload = () => this._onScriptLoad(parentNode, room, serverURL); - script.onerror = () => this._navigateToHome(); + script.onerror = this._navigateToHome; script.src = getExternalApiURL(serverURL); this._ref.current.appendChild(script); @@ -175,6 +176,8 @@ class Conference extends Component<Props, State> { } } + _navigateToHome: (*) => void; + /** * Navigates to home screen (Welcome). * @@ -212,7 +215,7 @@ class Conference extends Component<Props, State> { setupAlwaysOnTopRender(this._api); setupWiFiStats(iframe); - this._api.on('readyToClose', () => this._navigateToHome()); + this._api.on('readyToClose', this._navigateToHome); this._api.on('videoConferenceJoined', (conferenceInfo: Object) => this._onVideoConferenceJoined(conferenceInfo));