Update checks on save for new loop block field (#1486)
This commit is contained in:
@@ -1691,11 +1691,11 @@ function getWorkflowErrors(nodes: Array<AppNode>): Array<string> {
|
|||||||
// check loop node parameters
|
// check loop node parameters
|
||||||
const loopNodes: Array<LoopNode> = nodes.filter(isLoopNode);
|
const loopNodes: Array<LoopNode> = nodes.filter(isLoopNode);
|
||||||
const emptyLoopNodes = loopNodes.filter(
|
const emptyLoopNodes = loopNodes.filter(
|
||||||
(node: LoopNode) => node.data.loopValue === "",
|
(node: LoopNode) => node.data.loopVariableReference === "",
|
||||||
);
|
);
|
||||||
if (emptyLoopNodes.length > 0) {
|
if (emptyLoopNodes.length > 0) {
|
||||||
emptyLoopNodes.forEach((node) => {
|
emptyLoopNodes.forEach((node) => {
|
||||||
errors.push(`${node.data.label}: Loop value parameter is required.`);
|
errors.push(`${node.data.label}: Loop value is required.`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user