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