[Glitch] Fix empty display name precedence over username in web UI

Port 4084814d8a to glitch-soc
lolsob-rspec
Thibaut Girka 2018-10-30 17:54:50 +01:00
parent fd18ed4cea
commit 5ad4bcbece
1 changed files with 1 additions and 1 deletions

View 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);