Set onBuildComplete to run after all layers

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-30 17:58:01 -03:00
commit f9cb449c4f

View file

@ -204,12 +204,11 @@ export async function buildVertices({
if (stop) { if (stop) {
break; break;
} }
}
if (onBuildComplete) { if (onBuildComplete) {
const allNodesValid = buildResults.every((result) => result); const allNodesValid = buildResults.every((result) => result);
onBuildComplete(allNodesValid); onBuildComplete(allNodesValid);
useFlowStore.getState().setIsBuilding(false); useFlowStore.getState().setIsBuilding(false);
}
} }
} }
async function buildVertex({ async function buildVertex({