fix(#497): set validty before using it when updating interaction call

This commit is contained in:
dtfiedler
2024-01-26 09:32:28 -07:00
committed by just_ppe
parent 5801737238
commit d08b0902f8

View File

@@ -252,6 +252,8 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
if (result.type !== 'ok') {
errorMessages[missingInteraction.id] = errorMessage;
}
const isValidInteraction = result.type === 'ok';
validity[missingInteraction.id] = isValidInteraction;
this.logResult<State>(result, missingInteraction, executionContext);
@@ -270,8 +272,6 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
throw new Error(`Exception while processing ${JSON.stringify(interaction)}:\n${result.errorMessage}`);
}
const isValidInteraction = result.type === 'ok';
validity[missingInteraction.id] = isValidInteraction;
currentState = result.state;
const toCache = new EvalStateResult(currentState, validity, errorMessages);