From e3e235cd4a713e60a576f8af80c284d82b221b16 Mon Sep 17 00:00:00 2001 From: josc146 Date: Fri, 31 Mar 2023 19:20:19 +0800 Subject: [PATCH] chore: make updateAnswer also effect error --- src/components/ConversationCard/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index f620764..bd8f14e 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -97,7 +97,7 @@ function ConversationCard(props) { const updateAnswer = (value, appended, newType, done = false) => { setConversationItemData((old) => { const copy = [...old] - const index = copy.findLastIndex((v) => v.type === 'answer') + const index = copy.findLastIndex((v) => v.type === 'answer' || v.type === 'error') if (index === -1) return copy copy[index] = new ConversationItemData( newType,