mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
unsub from queryParams observable
This commit is contained in:
@@ -110,7 +110,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
||||
});
|
||||
|
||||
const restoredScopeState = await this.restoreState();
|
||||
this.route.queryParams.subscribe(async (params) => {
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
||||
this.state = (await this.stateService.get<any>(ComponentId)) || {};
|
||||
if (this.state.searchText) {
|
||||
this.searchText = this.state.searchText;
|
||||
@@ -132,6 +132,7 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
|
||||
if (!this.syncService.syncInProgress || restoredScopeState) {
|
||||
window.setTimeout(() => this.popupUtils.setContentScrollY(window, this.state.scrollY), 0);
|
||||
}
|
||||
queryParamsSub.unsubscribe();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user