1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

unsub from query params route observable

This commit is contained in:
Kyle Spearrin
2018-12-20 10:16:19 -05:00
parent 645fa8e7ca
commit 8dff57e89e
2 changed files with 33 additions and 33 deletions

2
jslib

Submodule jslib updated: aa17849329...cddeeefdbb

View File

@@ -163,15 +163,13 @@ export class VaultComponent implements OnInit, OnDestroy {
} }
async load() { async load() {
this.route.queryParams.subscribe(async (params) => { const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
await this.groupingsComponent.load(); await this.groupingsComponent.load();
if (params == null) { if (params == null) {
this.groupingsComponent.selectedAll = true; this.groupingsComponent.selectedAll = true;
await this.ciphersComponent.load(); await this.ciphersComponent.load();
return; } else {
}
if (params.cipherId) { if (params.cipherId) {
const cipherView = new CipherView(); const cipherView = new CipherView();
cipherView.id = params.cipherId; cipherView.id = params.cipherId;
@@ -202,6 +200,8 @@ export class VaultComponent implements OnInit, OnDestroy {
this.groupingsComponent.selectedAll = true; this.groupingsComponent.selectedAll = true;
await this.ciphersComponent.load(); await this.ciphersComponent.load();
} }
}
queryParamsSub.unsubscribe();
}); });
} }