mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03: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:
parent
487326aef5
commit
036b195af9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user