From 085b315883ea50483b4e3e427b6e4625d62ef292 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Thu, 4 Sep 2025 14:44:51 +0200 Subject: [PATCH] In the case of uncommited process, still returns data from the first state --- src/service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/service.ts b/src/service.ts index 4469d74..62dc2d3 100644 --- a/src/service.ts +++ b/src/service.ts @@ -699,12 +699,11 @@ export class Service { const data: Record = {}; // Now we decrypt all we can in the processes for (const [processId, process] of Object.entries(filteredProcesses)) { - console.log('process roles:', this.getRoles(process)); // We also take the public data - const lastState = this.getLastCommitedState(process); + let lastState = this.getLastCommitedState(process); if (!lastState) { - console.error(`❌ Process ${processId} doesn't have a commited state`); - continue; + // fallback on the first state + lastState = process.states[0]; } const processData: Record = {}; for (const attribute of Object.keys(lastState.public_data)) {