fix: fix removing emoji from display names (#1114)

This commit is contained in:
Nolan Lawson 2019-03-22 15:55:33 -07:00 committed by GitHub
parent 47255e818c
commit cf104163fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -88,12 +88,12 @@
id: ({ verifyCredentials }) => (verifyCredentials && verifyCredentials.id),
href: ({ id }) => (id ? `/accounts/${id}` : '#'),
emojis: ({ verifyCredentials }) => (verifyCredentials.emojis || []),
displayName: ({ verifyCredentials }) => verifyCredentials.display_name || verifyCredentials.username,
displayName: ({ verifyCredentials }) => verifyCredentials.display_name || verifyCredentials.username || '',
accessibleName: ({ displayName, emojis, $omitEmojiInDisplayNames }) => {
if ($omitEmojiInDisplayNames) {
return removeEmoji(displayName, emojis) || displayName || ''
return removeEmoji(displayName, emojis) || displayName
}
return displayName || ''
return displayName
}
}
}