Skip to content

Commit 32d7555

Browse files
committed
guarded against null/undefined name claim
1 parent 219dff2 commit 32d7555

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function Chat() {
3737
const initialMessage = useMemo<Message>(
3838
() => ({
3939
id: generateMessageId(),
40-
content: `Hello ${user?.name?.split(' ')[0] || ''}! I'm your AI assistant. How can I help you today?`,
40+
content: `Hello ${user?.name?.split(' ')[0] ?? 'there'}! I'm your AI assistant. How can I help you today?`,
4141
role: 'assistant',
4242
}),
4343
[user?.name],

0 commit comments

Comments
 (0)