Skip to content

Commit

Permalink
Fix emoji display in the profile selector (#2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored Nov 4, 2022
1 parent 6b0724f commit 27992e4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ export default Vue.extend({
return this.$store.getters.getDefaultProfile
},
activeProfileInitial: function () {
return this.activeProfile?.name?.length > 0 ? this.activeProfile.name[0].toUpperCase() : ''
// use Array.from, so that emojis don't get split up into individual character codes
return this.activeProfile?.name?.length > 0 ? Array.from(this.activeProfile.name)[0].toUpperCase() : ''
},
profileInitials: function () {
return this.profileList.map((profile) => {
return profile?.name?.length > 0 ? profile.name[0].toUpperCase() : ''
return profile?.name?.length > 0 ? Array.from(profile.name)[0].toUpperCase() : ''
})
}
},
Expand Down

0 comments on commit 27992e4

Please sign in to comment.