File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
@@ -187,7 +187,7 @@ class GitHubApi{
187187 if ( 0 < location . href . indexOf ( '?oAuthCode=' ) ) {
188188 oAuthCode = location . href . substr ( location . href . indexOf ( '=' ) + 1 )
189189 }
190- if ( ! GitHubApi . getSession ( ) . accessToken ) {
190+ if ( ! GitHubApi . getSession ( ) ? .accessToken ) {
191191 GitHubApi . logout ( ) ;
192192 }
193193 if ( oAuthCode !== null ) {
@@ -202,7 +202,7 @@ class GitHubApi{
202202 }
203203 }
204204 static isLoggedIn ( ) {
205- return ! ! GitHubApi . getSession ( ) . accessToken ;
205+ return ! ! GitHubApi . getSession ( ) ? .accessToken ;
206206 }
207207 static logout ( ) {
208208 localStorage . removeItem ( GitHubApi . #SESSION_KEY) ;
You can’t perform that action at this time.
0 commit comments