add check for name in Avatar component
This commit is contained in:
parent
61cabc7fc5
commit
07252b26b4
|
@ -16,7 +16,10 @@
|
||||||
|
|
||||||
function getInitials(name) {
|
function getInitials(name) {
|
||||||
let parts = name.split(" ")
|
let parts = name.split(" ")
|
||||||
return parts.map(name => name[0]).join("")
|
if (parts.length > 0) {
|
||||||
|
return parts.map(name => name[0]).join("")
|
||||||
|
}
|
||||||
|
return name
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue