Refresh login page if server version of client doesn't match browser version of client (#3004)

Этот коммит содержится в:
Joram Wilander
2016-05-16 19:09:37 -04:00
коммит произвёл Corey Hulen
родитель 2ccf5bbaa2
Коммит 34780f3aea
4 изменённых файлов: 28 добавлений и 14 удалений

Просмотреть файл

@@ -24,6 +24,7 @@ import * as AsyncClient from 'utils/async_client.jsx';
import ChannelStore from 'stores/channel_store.jsx';
import ErrorStore from 'stores/error_store.jsx';
import TeamStore from 'stores/team_store.jsx';
import BrowserStore from 'stores/browser_store.jsx';
import * as Utils from 'utils/utils.jsx';
import Client from 'utils/web_client.jsx';
@@ -101,9 +102,10 @@ function preRenderSetup(callwhendone) {
}
);
// Make sure the websockets close
// Make sure the websockets close and reset version
$(window).on('beforeunload',
() => {
BrowserStore.setLastServerVersion('');
Websockets.close();
}
);