0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed transitions redirect to BMA loop

This commit is contained in:
Aileen Nowak 2021-10-28 12:10:17 +02:00
parent 5593407647
commit b48d4ec5e9

View file

@ -12,7 +12,12 @@ Route.reopen({
transition.abort(); transition.abort();
this.upgradeStatus.requireUpgrade(); this.upgradeStatus.requireUpgrade();
return false; return false;
} else if (this.config.get('hostSettings.forceUpgrade') && transition.to?.name !== 'signout') { } else if (this.config.get('hostSettings.forceUpgrade')) {
// Do not prevent transitions to the BMA or to signout
if (transition.to?.name === 'pro.index' || transition.to?.name === 'signout') {
return true;
}
transition.abort(); transition.abort();
// Catch and redirect every route in a force upgrade state // Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro'); this.billing.openBillingWindow(this.router.currentURL, '/pro');