From 0e2d918b3b3807041126bc66d3e0d205d42c7820 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 8 Jun 2016 15:42:18 +1000 Subject: [PATCH] correct blankish username not treated correctly in post stream --- app/assets/javascripts/discourse/widgets/poster-name.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/poster-name.js.es6 b/app/assets/javascripts/discourse/widgets/poster-name.js.es6 index d9fb725c525..4590da3424d 100644 --- a/app/assets/javascripts/discourse/widgets/poster-name.js.es6 +++ b/app/assets/javascripts/discourse/widgets/poster-name.js.es6 @@ -27,7 +27,7 @@ export default createWidget('poster-name', { html(attrs) { const username = attrs.username; const name = attrs.name; - const nameFirst = this.siteSettings.display_name_on_posts && !this.siteSettings.prioritize_username_in_ux && name && name.length > 0; + const nameFirst = this.siteSettings.display_name_on_posts && !this.siteSettings.prioritize_username_in_ux && name && name.trim().length > 0; const classNames = nameFirst ? ['first','full-name'] : ['first','username']; if (attrs.staff) { classNames.push('staff'); }