fix: Add type check for account username
This commit is contained in:
2 files changed
+7
-4
No files matched your search
@@ -13,12 +13,14 @@ export default class AccountModel extends GeneratedAccountModel {
|
||||
@fragment('fragment-account-attributes', { defaultValue: {} }) attributes;
|
||||
|
||||
/**
|
||||
* Convenience for getting login_name attribute.
|
||||
* Convenience for getting username in account.
|
||||
* @type {string}
|
||||
*/
|
||||
@computed('attributes.login_name')
|
||||
@computed('attributes')
|
||||
get username() {
|
||||
return this.attributes.login_name;
|
||||
if(this.type === 'password') {
|
||||
return this.attributes.login_name;
|
||||
}
|
||||
}
|
||||
|
||||
// =methods
|
||||
|
||||
Reference in new issue
Block a user