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);
}