mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
unsub from queryParams observable
This commit is contained in:
@@ -22,7 +22,7 @@ export class PasswordHistoryComponent extends BasePasswordHistoryComponent {
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
this.route.queryParams.subscribe(async (params) => {
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
||||
if (params.cipherId) {
|
||||
this.cipherId = params.cipherId;
|
||||
} else {
|
||||
@@ -30,6 +30,7 @@ export class PasswordHistoryComponent extends BasePasswordHistoryComponent {
|
||||
}
|
||||
|
||||
await super.ngOnInit();
|
||||
queryParamsSub.unsubscribe();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user