Skip to content

Commit bfb9674

Browse files
committed
Update signout-link.js
1 parent ac06134 commit bfb9674

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/components/signout-link.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ export default Ember.Component.extend({
44
currentUserObserver: function() {
55
if(this.get('currentUser')){
66
var currentUser = this.get('currentUser');
7-
if(this.get('avatarAttribute')){
7+
if(this.get('avatarAttribute.thumb_url')){
88
this.setProperties({
99
isAvatarPresent: !Ember.isEmpty(currentUser.get(this.get('avatarAttribute'))),
1010
avatarUrl: currentUser.get(this.get('avatarAttribute.thumb_url'))
1111
});
1212
}
13-
this.set('username', currentUser.get(this.get('nameAttribute')));
13+
if (this.get('nameAttribute')){
14+
this.set('username', currentUser.get(this.get('nameAttribute')));
15+
}
1416
}
1517
}.observes('currentUser'),
1618
actions:{

0 commit comments

Comments
 (0)