fix(#497): set validty before using it when updating interaction call
This commit is contained in:
@@ -252,6 +252,8 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
|
|||||||
if (result.type !== 'ok') {
|
if (result.type !== 'ok') {
|
||||||
errorMessages[missingInteraction.id] = errorMessage;
|
errorMessages[missingInteraction.id] = errorMessage;
|
||||||
}
|
}
|
||||||
|
const isValidInteraction = result.type === 'ok';
|
||||||
|
validity[missingInteraction.id] = isValidInteraction;
|
||||||
|
|
||||||
this.logResult<State>(result, missingInteraction, executionContext);
|
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}`);
|
throw new Error(`Exception while processing ${JSON.stringify(interaction)}:\n${result.errorMessage}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isValidInteraction = result.type === 'ok';
|
|
||||||
validity[missingInteraction.id] = isValidInteraction;
|
|
||||||
currentState = result.state;
|
currentState = result.state;
|
||||||
|
|
||||||
const toCache = new EvalStateResult(currentState, validity, errorMessages);
|
const toCache = new EvalStateResult(currentState, validity, errorMessages);
|
||||||
|
|||||||
Reference in New Issue
Block a user