From a08deff7909b68a89662f8b93845918bdc613732 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 7 Sep 2017 17:22:24 +0200 Subject: Finish rack mode machine list rendering --- src/auth/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/auth/index.js') 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 => { -- cgit v1.2.3