check authed before checking if token has premium (#170)

This commit is contained in:
Kyle Spearrin 2020-09-18 15:02:49 -04:00 committed by GitHub
parent 27bcbf4b41
commit 0a20face13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ export class UserService implements UserServiceAbstraction {
}
async canAccessPremium(): Promise<boolean> {
const authed = await this.isAuthenticated();
if (!authed) {
return false;
}
const tokenPremium = this.tokenService.getPremium();
if (tokenPremium) {
return true;