Fix empty display name precedence over username in web UI (#9163)

Fix #9131
lolsob-rspec
Eugen Rochko 2018-10-30 17:06:12 +01:00 committed by GitHub
parent e242688a74
commit 4084814d8a
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export function normalizeAccount(account) {
account = { ...account };
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);