Delete unused code (#912)

This commit is contained in:
Kerem Yilmaz
2024-10-04 14:53:50 -07:00
committed by GitHub
parent 8b79dfa236
commit aedb7d2cc8

View File

@@ -601,19 +601,6 @@ function FlowRenderer({
});
return;
}
// TODO might need to abstract this out or find different way to handle errors
const loopNodes: Array<LoopNode> = nodes.filter(isLoopNode);
const emptyLoopNodes = loopNodes.filter(
(node: LoopNode) => node.data.loopValue === "",
);
if (emptyLoopNodes.length > 0) {
toast({
title: "Can not save workflow because of errors",
description: `${emptyLoopNodes.map((node) => node.data.label).join(", ")}: Loop value cannot be empty`,
variant: "destructive",
});
return;
}
await handleSave();
}}
/>