mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
Removing hanging promises, and adding a guard to projects routing (#8891)
* Removing hanging promises, and adding a guard to projects routing * Additional logging * adding tests * Trying to get Jest tests working * coltons suggested changes
This commit is contained in:
@@ -4,6 +4,7 @@ import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { combineLatest, Subject, switchMap, takeUntil, catchError } from "rxjs";
|
||||
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||
import { DialogService } from "@bitwarden/components";
|
||||
@@ -38,8 +39,9 @@ export class ProjectPeopleComponent implements OnInit, OnDestroy {
|
||||
}),
|
||||
),
|
||||
catchError(async () => {
|
||||
this.logService.info("Error fetching project people access policies.");
|
||||
await this.router.navigate(["/sm", this.organizationId, "projects"]);
|
||||
return [];
|
||||
return undefined;
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -70,6 +72,7 @@ export class ProjectPeopleComponent implements OnInit, OnDestroy {
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService,
|
||||
private accessPolicySelectorService: AccessPolicySelectorService,
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
Reference in New Issue
Block a user