Refactor buildVertices function to handle validation error

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-28 17:34:00 -03:00
commit b84210c583

View file

@ -119,10 +119,8 @@ export async function buildVertices({
try {
onValidateNodes(verticesOrderResponse.verticesToRun);
} catch (e) {
if (onBuildComplete) {
onBuildComplete(false);
useFlowStore.getState().setIsBuilding(false);
}
useFlowStore.getState().setIsBuilding(false);
return;
}
}