Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Fix empty display name precedence over username in web UI (mastodon#9163
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored Oct 30, 2018
1 parent cc45a8f commit f59b840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/actions/importer/normalizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f59b840

Please sign in to comment.