Skip to content

Commit a59a198

Browse files
committed
fix: handle undefined follow_up_queries in reflection event
Add optional chaining and fallback value to prevent TypeError when event.reflection.follow_up_queries is undefined in onUpdateEvent handler.
1 parent cf240a2 commit a59a198

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export default function App() {
5454
title: "Reflection",
5555
data: event.reflection.is_sufficient
5656
? "Search successful, generating final answer."
57-
: `Need more information, searching for ${event.reflection.follow_up_queries.join(
57+
: `Need more information, searching for ${event.reflection.follow_up_queries?.join(
5858
", "
59-
)}`,
59+
) || "additional information"}`,
6060
};
6161
} else if (event.finalize_answer) {
6262
processedEvent = {

0 commit comments

Comments
 (0)