diff --git a/opentrons-ai-client/src/molecules/InputPrompt/index.tsx b/opentrons-ai-client/src/molecules/InputPrompt/index.tsx index 0c9eeef0a42..3b5254a799c 100644 --- a/opentrons-ai-client/src/molecules/InputPrompt/index.tsx +++ b/opentrons-ai-client/src/molecules/InputPrompt/index.tsx @@ -53,6 +53,7 @@ export function InputPrompt(): JSX.Element { return rowsNum } + // ToDo (kk:05/15/2024) This will be moved to a better place const fetchData = async (prompt: string): Promise => { if (prompt !== '') { setLoading(true) @@ -97,7 +98,7 @@ export function InputPrompt(): JSX.Element { }, [preparedPrompt, setValue]) React.useEffect(() => { - if (submitted && data && !loading) { + if (submitted && data != null && !loading) { const { role, reply } = data const assistantResponse: ChatData = { role,