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 { I18nService } from '../../abstractions/i18n.service';
|
||||
import { SyncService } from '../../abstractions/sync.service';
|
||||
|
||||
export class LoginComponent {
|
||||
@Input() email: string = '';
|
||||
|
|
|
@ -160,7 +160,7 @@ export class TokenService implements TokenServiceAbstraction {
|
|||
getName(): string {
|
||||
const decoded = this.decodeToken();
|
||||
if (typeof decoded.name === 'undefined') {
|
||||
throw new Error('No name found');
|
||||
return null;
|
||||
}
|
||||
|
||||
return decoded.name as string;
|
||||
|
|
Loading…
Reference in New Issue