diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 9646bd946..3cc9b057e 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -982,8 +982,7 @@ export let mecanismSynchronisation = (recurse, k, v) => { let nodeValue = val(APIExplanation) == null ? null - : console.log(APIExplanation) || - path(v.chemin.split(' . '))(JSON.parse(val(APIExplanation))) + : path(v.chemin.split(' . '))(val(APIExplanation)) let missingVariables = val(APIExplanation) === null ? { [APIExplanation.dottedName]: 1 } : {} let explanation = { ...v, API: APIExplanation } diff --git a/source/engine/variables.js b/source/engine/variables.js index 0e0127371..c1544415d 100644 --- a/source/engine/variables.js +++ b/source/engine/variables.js @@ -29,6 +29,8 @@ export let evaluateVariable = (situationGate, variableName, rule) => { // test rec let value = situationGate(variableName) + if (rule.API) return value && JSON.parse(value) + if (rule.format != null) return value //boolean variables don't have a format prop, it's the default if (formatBooleanValue[value] !== undefined) return formatBooleanValue[value]