From d6b0f8d4c5254e22e132e73c2792b500707ef33b Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Sat, 4 Feb 2017 21:51:41 -0600 Subject: [PATCH] Use functions, do not re-implement them We have the functions reload and redirect which modify window.location. Use them and do not directly modify window.location so that we have fewer places of direct window.location modifications and it is easier to refactor them. --- conference.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conference.js b/conference.js index 736b231b8..f81cf2265 100644 --- a/conference.js +++ b/conference.js @@ -10,7 +10,7 @@ import Recorder from './modules/recorder/Recorder'; import mediaDeviceHelper from './modules/devices/mediaDeviceHelper'; -import {reportError} from './modules/util/helpers'; +import { reload, reportError } from './modules/util/helpers'; import UIEvents from './service/UI/UIEvents'; import UIUtil from './modules/UI/util/UIUtil'; @@ -417,7 +417,7 @@ class ConferenceConnector { APP.UI.notifyMaxUsersLimitReached(); break; case ConferenceErrors.INCOMPATIBLE_SERVER_VERSIONS: - window.location.reload(); + reload(); break; default: this._handleConferenceFailed(err, ...params); @@ -1474,7 +1474,7 @@ export default { APP.UI.addListener(UIEvents.LOGOUT, () => { AuthHandler.logout(room).then(url => { if (url) { - window.location.href = url; + UIUtil.redirect(url); } else { this.hangup(true); }