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 } diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 07ba7fa6e9..74bbda278c 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -282,6 +282,7 @@ {#if sortedRows?.length && fields.length} {#each sortedRows as row, idx}