aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-06 12:04:30 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-06 12:04:30 -0700
commitc9ae8f34bbdb75e95500ac8a2736d8eb9b4304d4 (patch)
treea5d930d3695a1ed548a927744fb89463852a10ea
parent40e9d7dda120ab6b3bdb844c08e6eacb2212dda2 (diff)
downloadtrackermap-web-c9ae8f34bbdb75e95500ac8a2736d8eb9b4304d4.tar.gz
trackermap-web-c9ae8f34bbdb75e95500ac8a2736d8eb9b4304d4.tar.bz2
trackermap-web-c9ae8f34bbdb75e95500ac8a2736d8eb9b4304d4.zip
Fix lint
-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;