From 614f4ca2286ffc87132939166b145e520e475f20 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 8 Jun 2016 15:24:27 +1000 Subject: [PATCH] correct bugs --- app/assets/javascripts/discourse/controllers/user.js.es6 | 2 +- app/assets/javascripts/discourse/templates/user/user.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index 65802be5ad9..b5151f1b33c 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -41,7 +41,7 @@ export default Ember.Controller.extend(CanCheckEmails, { return viewingSelf || staff; }, - @computed('model.user.name') + @computed('model.name') nameFirst(name) { return !this.get('siteSettings.prioritize_username_in_ux') && name && name.trim().length > 0; }, diff --git a/app/assets/javascripts/discourse/templates/user/user.hbs b/app/assets/javascripts/discourse/templates/user/user.hbs index 4fbca405c5b..292584ecb40 100644 --- a/app/assets/javascripts/discourse/templates/user/user.hbs +++ b/app/assets/javascripts/discourse/templates/user/user.hbs @@ -58,7 +58,7 @@
-

{{if nameFirst model.user model.username}} {{user-status model currentUser=currentUser}}

+

{{if nameFirst model.name model.username}} {{user-status model currentUser=currentUser}}

{{#if nameFirst}}{{model.username}}{{else}}{{model.name}}{{/if}}

{{#if model.title}}

{{model.title}}