nicer syntax

This commit is contained in:
iw0
2024-04-08 21:25:44 +02:00
parent c89de97523
commit 99fd412a83
2 changed files with 24 additions and 20 deletions

View File

@@ -5,7 +5,7 @@ async function getAuthToken() {
while (!tok) {
storageData = window.sessionStorage.getItem("token");
dec = JSON.parse(storageData);
if (!!dec && Object.keys(dec).includes("accessToken")) {
if (!!dec && "accessToken" in dec) {
let tokInspect = dec.accessToken;
if (tokInspect && tokInspect.startsWith("eyJ")) {
tok = tokInspect;