streamlines the /me endpoint to ensure consistency

This commit is contained in:
James
2020-07-09 12:37:33 -04:00
parent 7a2dd9e03c
commit f3dfaae261
2 changed files with 5 additions and 5 deletions

View File

@@ -71,11 +71,9 @@ const UserProvider = ({ children }) => {
if (request.status === 200) {
const json = await request.json();
if (json.user) {
setUser(json.user);
}
setUser(json?.user || null);
if (json.token) {
if (json?.token) {
setToken(json.token);
}
}