mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
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) {
|
if (node.type === CUSTOM_NODE) {
|
||||||
const checkData = getCheckData(node.data)
|
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) {
|
if (!errorMessage) {
|
||||||
const availableVars = map[node.id].availableVars
|
const availableVars = map[node.id].availableVars
|
||||||
|
|||||||
@ -58,7 +58,7 @@ const Node: FC<NodeProps<IterationNodeType>> = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data._children!.length === 1 && (
|
data._children?.length === 1 && (
|
||||||
<AddBlock
|
<AddBlock
|
||||||
iterationNodeId={id}
|
iterationNodeId={id}
|
||||||
iterationNodeData={data}
|
iterationNodeData={data}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ const Node: FC<NodeProps<LoopNodeType>> = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
data._children!.length === 1 && (
|
data._children?.length === 1 && (
|
||||||
<AddBlock
|
<AddBlock
|
||||||
loopNodeId={id}
|
loopNodeId={id}
|
||||||
loopNodeData={data}
|
loopNodeData={data}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user