Skip to content

Commit 7590769

Browse files
authored
Merge pull request #93 from AI-Tournaments/patch
More updates to GitHubApi.
2 parents 0695db1 + 71907b6 commit 7590769

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GitHubApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class GitHubApi{
1616
return session;
1717
}
1818
static getSessionStorage(){
19-
return GitHubApi.getSession().storage ?? {};
19+
return GitHubApi.getSession()?.storage ?? {};
2020
}
2121
static setSessionStorage(storage){
22-
let session = GitHubApi.getSession();
22+
const session = GitHubApi.getSession() ?? {};
2323
session.storage = storage;
2424
localStorage.setItem(GitHubApi.#SESSION_KEY, JSON.stringify(session));
2525
}

0 commit comments

Comments
 (0)