aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/SocketController.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index 886ae15b..ac950190 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -72,15 +72,15 @@ const SocketController = () => {
if (socket) {
socket.close();
}
- }
+ };
+ }
+ const response = await fetch('/api/session');
+ if (response.ok) {
+ dispatch(sessionActions.updateUser(await response.json()));
} else {
- const response = await fetch('/api/session');
- if (response.ok) {
- dispatch(sessionActions.updateUser(await response.json()));
- } else {
- history.push('/login');
- }
+ history.push('/login');
}
+ return null;
}, [authenticated]);
return null;