1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

null checks on query param sub

This commit is contained in:
Kyle Spearrin
2019-01-16 23:30:39 -05:00
parent c6e324bf16
commit 7653ce2234
10 changed files with 28 additions and 10 deletions

2
jslib

Submodule jslib updated: cb7336c0e8...cbcf0adad5

View File

@@ -29,7 +29,9 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
this.folderId = params.folderId;
}
await super.ngOnInit();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -66,7 +66,9 @@ export class AddEditComponent extends BaseAddEditComponent {
this.cipher.login.uris[0].uri = params.uri;
}
}
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
window.setTimeout(() => {

View File

@@ -26,7 +26,9 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
this.cipherId = params.cipherId;
await super.ngOnInit();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -131,7 +131,9 @@ export class CiphersComponent extends BaseCiphersComponent implements OnInit, On
window.setTimeout(() => this.popupUtils.setContentScrollY(window, this.state.scrollY), 0);
}
this.stateService.remove(ComponentId);
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
this.broadcasterService.subscribe(ComponentId, (message: any) => {

View File

@@ -27,7 +27,9 @@ export class CollectionsComponent extends BaseCollectionsComponent {
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
this.cipherId = params.cipherId;
await super.ngOnInit();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -132,7 +132,9 @@ export class GroupingsComponent extends BaseGroupingsComponent implements OnInit
if (!this.syncService.syncInProgress || restoredScopeState) {
window.setTimeout(() => this.popupUtils.setContentScrollY(window, this.state.scrollY), 0);
}
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -30,7 +30,9 @@ export class PasswordHistoryComponent extends BasePasswordHistoryComponent {
}
await super.ngOnInit();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -32,7 +32,9 @@ export class ShareComponent extends BaseShareComponent {
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
this.cipherId = params.cipherId;
await super.ngOnInit();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@@ -50,7 +50,9 @@ export class ViewComponent extends BaseViewComponent {
}
await this.load();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
super.ngOnInit();
}