mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-28 11:18:21 +08:00
chore: make updateAnswer also effect error
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user