1
0
mirror of https://github.com/bitwarden/web synced 2026-01-01 16:13:15 +00:00

unsubscribe from queryparams observable

This commit is contained in:
Kyle Spearrin
2018-12-20 10:06:40 -05:00
parent 7efd81191a
commit 5804c57236
8 changed files with 36 additions and 27 deletions

View File

@@ -66,7 +66,7 @@ export class VaultComponent implements OnInit, OnDestroy {
this.groupingsComponent.organization = this.organization;
this.ciphersComponent.organization = this.organization;
this.route.queryParams.subscribe(async (qParams) => {
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
this.ciphersComponent.searchText = this.groupingsComponent.searchText = qParams.search;
if (!this.organization.isAdmin) {
await this.syncService.fullSync(false);
@@ -111,6 +111,8 @@ export class VaultComponent implements OnInit, OnDestroy {
this.viewEvents(cipher[0]);
}
}
queryParamsSub.unsubscribe();
});
});
}