0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed upgrade not updating member state on reload

no-issue

The problem here is that upgrade would recieve the same token from the
localStorage cache, rather than a brand new token with the plan info.
This commit is contained in:
Fabien O'Carroll 2019-03-19 14:01:38 +01:00
parent 487326aef5
commit 036b195af9

View file

@ -88,6 +88,15 @@ function setupMembersListeners() {
function upgrade(event) {
event.preventDefault();
members.upgrade()
.then(() => {
return members.getToken({
audience: tokenAudience,
fresh: true
}).then(function (token) {
setCookie(token);
return true;
});
})
.then(reload);
}