mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06: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
@ -34,7 +34,11 @@ export default Discourse.ObjectController.extend({
|
|||||||
var currentUsername = this.get('username'),
|
var currentUsername = this.get('username'),
|
||||||
wasVisible = this.get('visible');
|
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});
|
this.setProperties({visible: true, username: username});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user