]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix empty display name precedence over username in web UI
authorThibaut Girka <thib@sitedethib.com>
Tue, 30 Oct 2018 16:54:50 +0000 (17:54 +0100)
committerThibaut Girka <thib@sitedethib.com>
Tue, 30 Oct 2018 16:54:50 +0000 (17:54 +0100)
Port f59b840549d1b4dfd02ae4f52b64149ff8de0165 to glitch-soc

app/javascript/flavours/glitch/reducers/accounts.js

index c2f016a87cfde941731175fecc2113b746c560ff..860c13534dd6c7206cb5efeb93a123a1a715a6e6 100644 (file)
@@ -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);
 
This page took 0.026129 seconds and 3 git commands to generate.