File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 55 "type" : " git" ,
66 "url" : " https://github.com/PropelAuth/javascript"
77 },
8- "version" : " 2.0.0 " ,
8+ "version" : " 2.0.1 " ,
99 "keywords" : [
1010 " auth" ,
1111 " user" ,
Original file line number Diff line number Diff line change @@ -154,13 +154,17 @@ export function createClient(authOptions: IAuthOptions): IAuthClient {
154154 function updateLastLoggedOutAt ( ) {
155155 const loggedOutAt = currentTimeSeconds ( )
156156 clientState . lastLoggedOutAtMessage = loggedOutAt
157- localStorage . setItem ( LOGGED_OUT_AT_KEY , String ( loggedOutAt ) )
157+ if ( hasLocalStorage ( ) ) {
158+ localStorage . setItem ( LOGGED_OUT_AT_KEY , String ( loggedOutAt ) )
159+ }
158160 }
159161
160162 function updateLastLoggedInAt ( ) {
161163 const loggedInAt = currentTimeSeconds ( )
162164 clientState . lastLoggedInAtMessage = loggedInAt
163- localStorage . setItem ( LOGGED_IN_AT_KEY , String ( loggedInAt ) )
165+ if ( hasLocalStorage ( ) ) {
166+ localStorage . setItem ( LOGGED_IN_AT_KEY , String ( loggedInAt ) )
167+ }
164168 }
165169
166170 function setAuthenticationInfoAndUpdateDownstream ( authenticationInfo : AuthenticationInfo | null ) {
You can’t perform that action at this time.
0 commit comments