summaryrefslogtreecommitdiff
path: root/src/auth
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-07 17:22:24 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:58 +0200
commita08deff7909b68a89662f8b93845918bdc613732 (patch)
tree4b995d9826891c6e84987b29bf071117f4307706 /src/auth
parente9909159dc5db91eda12437e18c1474cae848af7 (diff)
Finish rack mode machine list rendering
Diffstat (limited to 'src/auth')
-rw-r--r--src/auth/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth/index.js b/src/auth/index.js
index fb2a7038..418d816c 100644
--- a/src/auth/index.js
+++ b/src/auth/index.js
@@ -3,7 +3,7 @@ import {DELETE_CURRENT_USER_SUCCEEDED} from "../actions/users";
const getAuthObject = () => {
const authItem = localStorage.getItem("auth");
- if (!authItem) {
+ if (!authItem || authItem === "{}") {
return undefined;
}
return JSON.parse(authItem);
@@ -34,7 +34,7 @@ export const saveAuthLocalStorage = (payload) => {
};
export const clearAuthLocalStorage = () => {
- localStorage.setItem("auth", "{}");
+ localStorage.setItem("auth", "");
};
export const authRedirectMiddleware = store => next => action => {