Skip to content

Commit 4f9bc91

Browse files
authored
Merge pull request #373 from Gemini2035/fix/issue-366
fix: the info of operator can not be edited properly.
2 parents 9bb0415 + c0170c0 commit 4f9bc91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/editor/operator/EditorPerformer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { FC, useEffect, useState } from 'react'
2222
import { Control, UseFieldArrayMove, useFieldArray } from 'react-hook-form'
2323
import { SetRequired } from 'type-fest'
2424

25-
import type { CopilotDocV1 } from 'models/copilot.schema'
25+
import { CopilotDocV1 } from 'models/copilot.schema'
2626

2727
import { FactItem } from '../../FactItem'
2828
import { Droppable, Sortable } from '../../dnd'
@@ -289,7 +289,7 @@ export const EditorPerformer: FC<EditorPerformerProps> = ({ control }) => {
289289
addOperator()
290290
} else {
291291
updateOperator(
292-
operators.findIndex(({ name }) => name === operator.name),
292+
operators.findIndex(({ _id }) => _id === operator._id),
293293
operator,
294294
)
295295
}

0 commit comments

Comments
 (0)