Refactor arrow function

This commit is contained in:
akshitkrnagpal 2018-06-28 12:41:20 +05:30 committed by Saúl Ibarra Corretgé
parent 31d1bb8962
commit 351ec163b2
1 changed files with 5 additions and 2 deletions

View File

@ -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));