Skip to content

Commit

Permalink
cleared local storage on window close/unload (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisaxena23 authored May 19, 2022
1 parent 3497704 commit 3fc548f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ export class AppComponent implements OnInit,AfterViewInit {
this.hideLoginForm = false
}
window.onbeforeunload = ()=>{
this.paramStor.AUTH_TOKEN("");
this.paramStor.CURRENT_USER("");
this.paramStor.CURRENT_TENANT("");
this.paramStor.PASSWORD("");
this.paramStor.CURRENT_ROLE("")
this.paramStor.TOKEN_PERIOD("");
this.paramStor.CURRENT_PROJECTITEMID("")
this.paramStor.CURRENT_USERID("")
localStorage.removeItem('userItems')
window.sessionStorage['folderId'] = ""
window.sessionStorage['headerTag'] = ""
}
Expand Down

0 comments on commit 3fc548f

Please sign in to comment.