diff --git a/packages/bbui/src/Avatar/Avatar.svelte b/packages/bbui/src/Avatar/Avatar.svelte index 7a6ad5f004..f4e42b28a3 100644 --- a/packages/bbui/src/Avatar/Avatar.svelte +++ b/packages/bbui/src/Avatar/Avatar.svelte @@ -16,7 +16,10 @@ function getInitials(name) { let parts = name.split(" ") - return parts.map(name => name[0]).join("") + if (parts.length > 0) { + return parts.map(name => name[0]).join("") + } + return name }