From 93e820048b0303d8a4db4f97573da7100bd9a582 Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Thu, 13 Jul 2017 22:20:53 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20Corrige=20l'=C3=A9valuation=20des=20tau?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/mecanisms.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index e57b78656..0d4ffb0bd 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -206,7 +206,6 @@ export let mecanismPercentage = (recurse,k,v) => { return { type: 'numeric', category: 'percentage', - percentage: v, nodeValue: R.match(reg)(v)[1]/100, explanation: null, jsx: @@ -216,13 +215,14 @@ export let mecanismPercentage = (recurse,k,v) => { } else { let node = recurse(v) + let evaluate = (situation, parsedRules, node) => evaluateNode(situation, parsedRules, node.explanation) + let jsx = (nodeValue,explanation) => makeJsx(explanation) return { + evaluate, + jsx, type: 'numeric', category: 'percentage', - percentage: node.nodeValue, - nodeValue: node.nodeValue, - explanation: node, - jsx: node.jsx + explanation: node } } }