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: {
|
computed: {
|
||||||
profileInitial: function () {
|
profileInitial: function () {
|
||||||
return this.profileName.slice(0, 1).toUpperCase()
|
return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default Vue.extend({
|
||||||
return this.$store.getters.getColorValues
|
return this.$store.getters.getColorValues
|
||||||
},
|
},
|
||||||
profileInitial: function () {
|
profileInitial: function () {
|
||||||
return this.profileName.slice(0, 1).toUpperCase()
|
return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : ''
|
||||||
},
|
},
|
||||||
profileList: function () {
|
profileList: function () {
|
||||||
return this.$store.getters.getProfileList
|
return this.$store.getters.getProfileList
|
||||||
|
|
|
@ -27,11 +27,11 @@ export default Vue.extend({
|
||||||
return this.$store.getters.getDefaultProfile
|
return this.$store.getters.getDefaultProfile
|
||||||
},
|
},
|
||||||
activeProfileInitial: function () {
|
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 () {
|
profileInitials: function () {
|
||||||
return this.profileList.map((profile) => {
|
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