diff options
Diffstat (limited to 'src/auth/index.js')
| -rw-r--r-- | src/auth/index.js | 4 |
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 => { |
