diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-10-30 17:06:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 17:06:12 +0100 |
commit | f59b840549d1b4dfd02ae4f52b64149ff8de0165 (patch) | |
tree | 99aa5105a9ed16e5f1e3f8bf7a59d2053021c56f /app | |
parent | cc45a8f9f7e05df57641bea19e1290570e76c172 (diff) |
Fix empty display name precedence over username in web UI (#9163)
Fix #9131
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/actions/importer/normalizer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js index a2af3222e..34a4150fa 100644 --- a/app/javascript/mastodon/actions/importer/normalizer.js +++ b/app/javascript/mastodon/actions/importer/normalizer.js @@ -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); |