Skip to content

Commit

Permalink
remove Uncaught SyntaxError in Json.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdiyeh-deriv committed Aug 16, 2022
1 parent 2d75326 commit 9fa6afa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/App/initStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const setStorageEvents = root_store => {
break;
}
case 'active_loginid':
if (!JSON.parse(localStorage.getItem('active_loginid'))) {
if (
localStorage.getItem('active_loginid') === 'null' ||
localStorage.getItem('active_loginid') === null
) {
root_store.client.logout();
}
if (document.hidden) {
Expand Down

0 comments on commit 9fa6afa

Please sign in to comment.