From 0d6b8f36aaee9c8c68c64ce4a63bcc66c6faf78d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 17:54:50 +0100 Subject: [Glitch] Fix empty display name precedence over username in web UI Port f59b840549d1b4dfd02ae4f52b64149ff8de0165 to glitch-soc --- app/javascript/flavours/glitch/reducers/accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js index c2f016a87..860c13534 100644 --- a/app/javascript/flavours/glitch/reducers/accounts.js +++ b/app/javascript/flavours/glitch/reducers/accounts.js @@ -72,7 +72,7 @@ const normalizeAccount = (state, account) => { delete account.statuses_count; const emojiMap = makeEmojiMap(account); - const displayName = account.display_name.length === 0 ? account.username : account.display_name; + const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name; account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap); account.note_emojified = emojify(account.note, emojiMap); -- cgit