From 34780f3aea78bbf5dd35230ba7ad4a67618b42a0 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Mon, 16 May 2016 19:09:37 -0400
Subject: Refresh login page if server version of client doesn't match browser
 version of client (#3004)

---
 webapp/root.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webapp/root.jsx')

diff --git a/webapp/root.jsx b/webapp/root.jsx
index 2b54c2174..f53109cdd 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -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();
          }
     );
-- 
cgit v1.2.3-1-g7c22

