diff --git a/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 b/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 index 5130d1a9b82..c4b969defad 100644 --- a/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 +++ b/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 @@ -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});