From b3c96e822abb69c3b86dcbd56cd7bf22f9558b6e Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Thu, 13 Jul 2017 12:11:41 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20R=C3=A9pare=20partiellement=20le=20rend?= =?UTF-8?q?u=20des=20r=C3=A8gles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/mecanisms.js | 15 +++------------ source/engine/traverse.js | 25 +++++-------------------- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 17c01ed15..d0d3a7889 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -22,10 +22,7 @@ let evaluateArray = (reducer, start) => (situationGate, parsedRules, node) => { nodeValue, collectMissing, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -51,10 +48,7 @@ let evaluateObject = (objectShape, effect) => (situationGate, parsedRules, node) nodeValue, collectMissing, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -210,10 +204,7 @@ export let mecanismNumericalLogic = (recurse, k,v) => { nodeValue, collectMissing, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } diff --git a/source/engine/traverse.js b/source/engine/traverse.js index 43780334d..0fd96a025 100644 --- a/source/engine/traverse.js +++ b/source/engine/traverse.js @@ -89,10 +89,7 @@ let createVariableNode = (rules, rule, situationGate) => (parseResult) => { collectMissing, missingVariables, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -190,10 +187,7 @@ let treat = (situationGate, rules, rule) => rawNode => { nodeValue, collectMissing, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -260,10 +254,7 @@ let treat = (situationGate, rules, rule) => rawNode => { nodeValue, collectMissing, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -409,10 +400,7 @@ export let treatRuleRoot = (situationGate, rules, rule) => { ...node, nodeValue, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } } @@ -452,10 +440,7 @@ export let treatRuleRoot = (situationGate, rules, rule) => { ...node, nodeValue, explanation, - jsx: { - ...node.jsx, - value: nodeValue - } + jsx: R.assocPath(["props","value"],nodeValue,node.jsx) } }