unsub from query params route observable
This commit is contained in:
parent
645fa8e7ca
commit
8dff57e89e
2
jslib
2
jslib
|
@ -1 +1 @@
|
|||
Subproject commit aa1784932945bfd1115f366cf5dafc6b481c19a3
|
||||
Subproject commit cddeeefdbb14d5f70020fb705885eb05a0bb4339
|
|
@ -163,15 +163,13 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
async load() {
|
||||
this.route.queryParams.subscribe(async (params) => {
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
||||
await this.groupingsComponent.load();
|
||||
|
||||
if (params == null) {
|
||||
this.groupingsComponent.selectedAll = true;
|
||||
await this.ciphersComponent.load();
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (params.cipherId) {
|
||||
const cipherView = new CipherView();
|
||||
cipherView.id = params.cipherId;
|
||||
|
@ -202,6 +200,8 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||
this.groupingsComponent.selectedAll = true;
|
||||
await this.ciphersComponent.load();
|
||||
}
|
||||
}
|
||||
queryParamsSub.unsubscribe();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue