diff --git a/assets/script.js b/assets/script.js index 176843c..584a07d 100644 --- a/assets/script.js +++ b/assets/script.js @@ -1,4 +1,4 @@ -let UserInfo; +let UserInfo = {}; const toggleButton = document.getElementById("toggle_button") const navLinks = document.getElementById("navsite_list") @@ -342,9 +342,9 @@ async function getUserInfo() { doAction('/account', data, "User info retrieved Successfully!", "User info retrieval failed.", true) .then((result) => { if (result && result.Status === "Success") { - UserInfo = result.UserInfo; result.UserInfo.forEach(function callback(value, index) { localStorage.setItem("UserInfo_" + index, value); + UserInfo[index] = value; }); } });