diff --git a/ui/src/chatbot.tsx b/ui/src/chatbot.tsx index 837e383721..a13960034f 100644 --- a/ui/src/chatbot.tsx +++ b/ui/src/chatbot.tsx @@ -192,8 +192,7 @@ export const XChatbot = (props: Chatbot) => { } }, [props.events, props.name]), onDataChange = React.useCallback(() => { - if (props.data) setMsgs(processData(props.data)) - // if (props.data) setMsgs(prevMsgs => processData(props.data).map((msg, idx) => ({ ...msg, positive: prevMsgs?.[idx]?.positive }))) + if (props.data) setMsgs(prevMsgs => processData(props.data).map((msg, idx) => ({ ...msg, positive: prevMsgs?.[idx]?.positive }))) }, [props.data]), handlePositive = (id: I) => { setMsgs(messages => {