mirror of
https://github.com/Zippland/NanoComic.git
synced 2026-01-19 09:41:10 +08:00
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.
This commit is contained in:
@@ -54,9 +54,9 @@ export default function App() {
|
||||
title: "Reflection",
|
||||
data: event.reflection.is_sufficient
|
||||
? "Search successful, generating final answer."
|
||||
: `Need more information, searching for ${event.reflection.follow_up_queries.join(
|
||||
: `Need more information, searching for ${event.reflection.follow_up_queries?.join(
|
||||
", "
|
||||
)}`,
|
||||
) || "additional information"}`,
|
||||
};
|
||||
} else if (event.finalize_answer) {
|
||||
processedEvent = {
|
||||
|
||||
Reference in New Issue
Block a user