Skip to content

Commit f8a8fc5

Browse files
author
Roman Snapko
committed
chore
1 parent b1c56e1 commit f8a8fc5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/server/api/src/app/ai/chat

packages/server/api/src/app/ai/chat/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function sanitizeMessagesForChatName(
6767
const extractText = (content: ModelMessage['content']): string | null => {
6868
if (typeof content === 'string') {
6969
const text = content.trim();
70-
return text ? text : null;
70+
return text ?? null;
7171
}
7272

7373
if (Array.isArray(content)) {
@@ -88,7 +88,7 @@ export function sanitizeMessagesForChatName(
8888
.join('\n')
8989
.trim();
9090

91-
return merged ? merged : null;
91+
return merged ?? null;
9292
}
9393

9494
return null;

0 commit comments

Comments
 (0)