mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
Resolve the vault page redirect issue (#14941)
This commit is contained in:
@@ -87,6 +87,9 @@ export class OrganizationPaymentMethodComponent implements OnDestroy {
|
|||||||
const state = this.router.getCurrentNavigation()?.extras?.state;
|
const state = this.router.getCurrentNavigation()?.extras?.state;
|
||||||
// incase the above state is undefined or null we use redundantState
|
// incase the above state is undefined or null we use redundantState
|
||||||
const redundantState: any = location.getState();
|
const redundantState: any = location.getState();
|
||||||
|
const queryParam = this.activatedRoute.snapshot.queryParamMap.get(
|
||||||
|
"launchPaymentModalAutomatically",
|
||||||
|
);
|
||||||
if (state && Object.prototype.hasOwnProperty.call(state, "launchPaymentModalAutomatically")) {
|
if (state && Object.prototype.hasOwnProperty.call(state, "launchPaymentModalAutomatically")) {
|
||||||
this.launchPaymentModalAutomatically = state.launchPaymentModalAutomatically;
|
this.launchPaymentModalAutomatically = state.launchPaymentModalAutomatically;
|
||||||
} else if (
|
} else if (
|
||||||
@@ -94,6 +97,8 @@ export class OrganizationPaymentMethodComponent implements OnDestroy {
|
|||||||
Object.prototype.hasOwnProperty.call(redundantState, "launchPaymentModalAutomatically")
|
Object.prototype.hasOwnProperty.call(redundantState, "launchPaymentModalAutomatically")
|
||||||
) {
|
) {
|
||||||
this.launchPaymentModalAutomatically = redundantState.launchPaymentModalAutomatically;
|
this.launchPaymentModalAutomatically = redundantState.launchPaymentModalAutomatically;
|
||||||
|
} else if (queryParam === "true") {
|
||||||
|
this.launchPaymentModalAutomatically = true;
|
||||||
} else {
|
} else {
|
||||||
this.launchPaymentModalAutomatically = false;
|
this.launchPaymentModalAutomatically = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ export class TrialFlowService {
|
|||||||
private async navigateToPaymentMethod(orgId: string) {
|
private async navigateToPaymentMethod(orgId: string) {
|
||||||
await this.router.navigate(["organizations", `${orgId}`, "billing", "payment-method"], {
|
await this.router.navigate(["organizations", `${orgId}`, "billing", "payment-method"], {
|
||||||
state: { launchPaymentModalAutomatically: true },
|
state: { launchPaymentModalAutomatically: true },
|
||||||
|
queryParams: { launchPaymentModalAutomatically: true },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user