null checks on query param sub

This commit is contained in:
Kyle Spearrin 2019-01-16 23:30:32 -05:00
parent 47bda7d789
commit 650fc6aa27
9 changed files with 25 additions and 9 deletions

2
jslib

@ -1 +1 @@
Subproject commit cb7336c0e8ae1f0f74c76a4d6704555cc7440a3b
Subproject commit cbcf0adad5f313c1f37232311ddce318365911b3

View File

@ -37,7 +37,9 @@ export class LoginComponent extends BaseLoginComponent {
{ route: '/settings/create-organization', qParams: { plan: qParams.org } });
}
await super.ngOnInit();
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@ -44,7 +44,9 @@ export class RegisterComponent extends BaseRegisterComponent {
this.stateService.save('loginRedirect',
{ route: '/settings/create-organization', qParams: { plan: qParams.org } });
}
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}
}

View File

@ -56,7 +56,9 @@ export class CollectionsComponent implements OnInit {
await this.load();
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
this.searchText = qParams.search;
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
});
}

View File

@ -58,7 +58,9 @@ export class GroupsComponent implements OnInit {
await this.load();
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
this.searchText = qParams.search;
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
});
}

View File

@ -89,7 +89,9 @@ export class PeopleComponent implements OnInit {
this.events(user[0]);
}
}
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
});
}

View File

@ -112,7 +112,9 @@ export class VaultComponent implements OnInit, OnDestroy {
}
}
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
});
}

View File

@ -96,7 +96,9 @@ export class CreateOrganizationComponent implements OnInit {
if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') {
this.plan = qParams.plan;
}
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}

View File

@ -141,7 +141,9 @@ export class VaultComponent implements OnInit, OnDestroy {
});
});
queryParamsSub.unsubscribe();
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}