1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-21 02:11:54 +01:00

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

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;