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 { try {
onValidateNodes(verticesOrderResponse.verticesToRun); onValidateNodes(verticesOrderResponse.verticesToRun);
} catch (e) { } catch (e) {
if (onBuildComplete) { useFlowStore.getState().setIsBuilding(false);
onBuildComplete(false);
useFlowStore.getState().setIsBuilding(false);
}
return; return;
} }
} }