We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1c56e1 commit f8a8fc5Copy full SHA for f8a8fc5
1 file changed
packages/server/api/src/app/ai/chat/utils.ts
@@ -67,7 +67,7 @@ export function sanitizeMessagesForChatName(
67
const extractText = (content: ModelMessage['content']): string | null => {
68
if (typeof content === 'string') {
69
const text = content.trim();
70
- return text ? text : null;
+ return text ?? null;
71
}
72
73
if (Array.isArray(content)) {
@@ -88,7 +88,7 @@ export function sanitizeMessagesForChatName(
88
.join('\n')
89
.trim();
90
91
- return merged ? merged : null;
+ return merged ?? null;
92
93
94
return null;
0 commit comments