1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

fix(environment-urls): [PM-19890] [Defect][Extension] Environment URLs are removed (#14821)

* Return early to avoid setEnvironment

* Remove ts-strict-ignore and update typing
This commit is contained in:
Alec Rippberger
2025-05-19 14:14:12 -05:00
committed by GitHub
parent 4cb5d6d14d
commit 72cfc0bca1
2 changed files with 17 additions and 19 deletions

View File

@@ -111,16 +111,16 @@ export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
/**
* Opens the self-hosted settings dialog when the self-hosted option is selected.
*/
if (
option === Region.SelfHosted &&
(await SelfHostedEnvConfigDialogComponent.open(this.dialogService))
) {
this.toastService.showToast({
variant: "success",
title: "",
message: this.i18nService.t("environmentSaved"),
});
if (option === Region.SelfHosted) {
const dialogResult = await SelfHostedEnvConfigDialogComponent.open(this.dialogService);
if (dialogResult) {
this.toastService.showToast({
variant: "success",
title: "",
message: this.i18nService.t("environmentSaved"),
});
}
// Don't proceed to setEnvironment when the self-hosted dialog is cancelled
return;
}