Fix emoji initials in Profile Previews (#1407)
* updated get profile initial methods * simplify return statements
This commit is contained in:
parent
92dadefbbd
commit
f6c2e0937b
|
@ -22,7 +22,7 @@ export default Vue.extend({
|
|||
},
|
||||
computed: {
|
||||
profileInitial: function () {
|
||||
return this.profileName.slice(0, 1).toUpperCase()
|
||||
return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -44,7 +44,7 @@ export default Vue.extend({
|
|||
return this.$store.getters.getColorValues
|
||||
},
|
||||
profileInitial: function () {
|
||||
return this.profileName.slice(0, 1).toUpperCase()
|
||||
return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : ''
|
||||
},
|
||||
profileList: function () {
|
||||
return this.$store.getters.getProfileList
|
||||
|
|
|
@ -27,11 +27,11 @@ export default Vue.extend({
|
|||
return this.$store.getters.getDefaultProfile
|
||||
},
|
||||
activeProfileInitial: function () {
|
||||
return this.activeProfile.name.slice(0, 1).toUpperCase()
|
||||
return this?.activeProfile?.name?.length > 0 ? Array.from(this.activeProfile.name)[0].toUpperCase() : ''
|
||||
},
|
||||
profileInitials: function () {
|
||||
return this.profileList.map((profile) => {
|
||||
return profile.name.slice(0, 1).toUpperCase()
|
||||
return profile?.name?.length > 0 ? Array.from(profile.name)[0].toUpperCase() : ''
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue