mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: When we don't have an uploaded_avatar_id
don't try to show the
avatar. Wait until it's loaded.
This commit is contained in:
parent
0b368993b7
commit
5aa411b58c
1 changed files with 5 additions and 1 deletions
|
@ -34,7 +34,11 @@ export default Discourse.ObjectController.extend({
|
|||
var currentUsername = this.get('username'),
|
||||
wasVisible = this.get('visible');
|
||||
|
||||
this.set('avatar', {username: username, uploaded_avatar_id: uploadedAvatarId});
|
||||
if (uploadedAvatarId) {
|
||||
this.set('avatar', {username: username, uploaded_avatar_id: uploadedAvatarId});
|
||||
} else {
|
||||
this.set('avatar', null);
|
||||
}
|
||||
|
||||
this.setProperties({visible: true, username: username});
|
||||
|
||||
|
|
Loading…
Reference in a new issue