mirror of https://github.com/langgenius/dify.git
fix bug
This commit is contained in:
parent
e240175116
commit
2c4977dbb1
|
|
@ -116,7 +116,9 @@ export const useChecklist = (nodes: Node[], edges: Edge[]) => {
|
|||
|
||||
if (node.type === CUSTOM_NODE) {
|
||||
const checkData = getCheckData(node.data)
|
||||
let { errorMessage } = nodesExtraData![node.data.type].checkValid(checkData, t, moreDataForCheckValid)
|
||||
// temp fix nodeMetaData is undefined
|
||||
const nodeMetaData = nodesExtraData?.[node.data.type]
|
||||
let { errorMessage } = nodeMetaData?.checkValid ? nodeMetaData.checkValid(checkData, t, moreDataForCheckValid) : { errorMessage: undefined }
|
||||
|
||||
if (!errorMessage) {
|
||||
const availableVars = map[node.id].availableVars
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const Node: FC<NodeProps<IterationNodeType>> = ({
|
|||
)
|
||||
}
|
||||
{
|
||||
data._children!.length === 1 && (
|
||||
data._children?.length === 1 && (
|
||||
<AddBlock
|
||||
iterationNodeId={id}
|
||||
iterationNodeData={data}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const Node: FC<NodeProps<LoopNodeType>> = ({
|
|||
)
|
||||
}
|
||||
{
|
||||
data._children!.length === 1 && (
|
||||
data._children?.length === 1 && (
|
||||
<AddBlock
|
||||
loopNodeId={id}
|
||||
loopNodeData={data}
|
||||
|
|
|
|||
Loading…
Reference in New Issue