From e8a8703a4bfd0c245100beb1a0e15551b5c52f84 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 6 Oct 2016 22:07:32 +0200 Subject: Fix how missing display name is displayed (fallback to username) --- .../javascripts/components/features/account/components/header.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/components/features') diff --git a/app/assets/javascripts/components/features/account/components/header.jsx b/app/assets/javascripts/components/features/account/components/header.jsx index 8a4a629ce..b07a4a967 100644 --- a/app/assets/javascripts/components/features/account/components/header.jsx +++ b/app/assets/javascripts/components/features/account/components/header.jsx @@ -12,6 +12,12 @@ const Header = React.createClass({ render () { const { account } = this.props; + let displayName = account.get('display_name'); + + if (displayName.length === 0) { + displayName = account.get('username'); + } + return (
@@ -19,7 +25,7 @@ const Header = React.createClass({
- {account.get('display_name')} + {displayName} @{account.get('acct')}

{account.get('note')}

-- cgit