Skip to content

Commit bc5e20a

Browse files
committed
fix: empty message edge case
1 parent a968e5b commit bc5e20a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/functions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const flattenMessage = (
315315
}
316316
}
317317

318-
if (msg.children && !message.end_turn) {
318+
if (msg.children && !(message.end_turn && flattenedMessage.join("") != "")) {
319319
msg.children.forEach((childId) => {
320320
const child = mapping[childId]
321321
if (child.message?.author?.role == "user") return

0 commit comments

Comments
 (0)