FIXED: variable for user storage

This commit is contained in:
Luis Fernando Molina committed 2019-05-15 09:51:06 +02:00
1 parent 4b812349af
commit 2365fbdb9c
3 files changed
+16 -9

No files matched your search

+4 -4
View File
@@ -41,9 +41,9 @@ function newWorkspace () {
async function saveToStrategyzer () {
try {
const accessToken = window.localStorage.getItem(LOGGED_IN_ACCESS_TOKEN_LOCAL_STORAGE)
const accessToken = window.localStorage.getItem(LOGGED_IN_ACCESS_TOKEN_LOCAL_STORAGE_KEY)
let user = window.localStorage.getItem(LOGGED_IN_USER_LOCAL_STORAGE)
let user = window.localStorage.getItem(LOGGED_IN_USER_LOCAL_STORAGE_KEY)
if (user === null) {
if (ERROR_LOG === true) { logger.write('[ERROR] saveToStrategyzer -> Can not save because user is not logged in. ') }
return
@@ -253,9 +253,9 @@ function newWorkspace () {
async function loadFromStrategyzer () {
try {
const accessToken = window.localStorage.getItem(LOGGED_IN_ACCESS_TOKEN_LOCAL_STORAGE)
const accessToken = window.localStorage.getItem(LOGGED_IN_ACCESS_TOKEN_LOCAL_STORAGE_KEY)
let user = window.localStorage.getItem(LOGGED_IN_USER_LOCAL_STORAGE)
let user = window.localStorage.getItem(LOGGED_IN_USER_LOCAL_STORAGE_KEY)
if (user === null) {
// if there is no user that means that we are logged off, which means this object can not be used.
return