Move call to reset InactiveNodes to the end of the function

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-22 23:45:55 -03:00
commit a4c432a64b

View file

@ -50,7 +50,6 @@ export async function buildVertices({
useFlowStore.getState().updateBuildStatus(verticesIds, BuildStatus.TO_BUILD);
useFlowStore.getState().updateVerticesBuild(verticesIds);
useFlowStore.getState().setIsBuilding(true);
useFlowStore.getState().setInactiveNodes([]);
// Set each vertex state to building
const buildResults: Array<boolean> = [];
@ -89,6 +88,7 @@ export async function buildVertices({
const allNodesValid = buildResults.every((result) => result);
onBuildComplete(allNodesValid);
useFlowStore.getState().setIsBuilding(false);
useFlowStore.getState().setInactiveNodes([]);
}
}