mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-27 17:18:04 +01:00
allow null name
This commit is contained in:
parent
f6a5979334
commit
67b2b53185
@ -8,7 +8,6 @@ import { AuthResult } from '../../models/domain/authResult';
|
|||||||
|
|
||||||
import { AuthService } from '../../abstractions/auth.service';
|
import { AuthService } from '../../abstractions/auth.service';
|
||||||
import { I18nService } from '../../abstractions/i18n.service';
|
import { I18nService } from '../../abstractions/i18n.service';
|
||||||
import { SyncService } from '../../abstractions/sync.service';
|
|
||||||
|
|
||||||
export class LoginComponent {
|
export class LoginComponent {
|
||||||
@Input() email: string = '';
|
@Input() email: string = '';
|
||||||
|
@ -160,7 +160,7 @@ export class TokenService implements TokenServiceAbstraction {
|
|||||||
getName(): string {
|
getName(): string {
|
||||||
const decoded = this.decodeToken();
|
const decoded = this.decodeToken();
|
||||||
if (typeof decoded.name === 'undefined') {
|
if (typeof decoded.name === 'undefined') {
|
||||||
throw new Error('No name found');
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return decoded.name as string;
|
return decoded.name as string;
|
||||||
|
Loading…
Reference in New Issue
Block a user