Skip to content

Commit e055cee

Browse files
committed
updates
1 parent 835bc39 commit e055cee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hooks/useVapiChat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ export const handleStreamChunk = (
127127

128128
// Since we pre-allocated, we know the index is always valid
129129
if (assistantMessageIndexRef.current !== null) {
130+
const targetIndex = assistantMessageIndexRef.current!;
130131
setMessages((prev) => {
131132
const newMessages = [...prev];
132-
const targetIndex = assistantMessageIndexRef.current!;
133133

134134
if (targetIndex < newMessages.length) {
135135
newMessages[targetIndex] = {

0 commit comments

Comments
 (0)