File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/components/ConversationCard Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { useConfig } from '../../hooks/use-config.mjs'
17
17
import { createSession } from '../../services/local-session.mjs'
18
18
import { v4 as uuidv4 } from 'uuid'
19
19
import { initSession } from '../../services/init-session.mjs'
20
+ import { findLastIndex } from 'lodash-es'
20
21
21
22
const logo = Browser . runtime . getURL ( 'logo.png' )
22
23
@@ -97,7 +98,7 @@ function ConversationCard(props) {
97
98
const updateAnswer = ( value , appended , newType , done = false ) => {
98
99
setConversationItemData ( ( old ) => {
99
100
const copy = [ ...old ]
100
- const index = copy . findLastIndex ( ( v ) => v . type === 'answer' || v . type === 'error' )
101
+ const index = findLastIndex ( copy , ( v ) => v . type === 'answer' || v . type === 'error' )
101
102
if ( index === - 1 ) return copy
102
103
copy [ index ] = new ConversationItemData (
103
104
newType ,
You can’t perform that action at this time.
0 commit comments