🐛 Corrige quelques bugs mineurs

pull/47/head
Laurent Bossavit 2017-09-07 22:43:24 +02:00
parent f97027b29e
commit f8624916be
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ export default class Question extends Component {
radioDottedName.split(name + ' . ')[1]
return (<ul>
{ choices.children.map( ({name, titre, dottedName, children}) =>
{ choices.children && choices.children.map( ({name, titre, dottedName, children}) =>
children ?
<li key={name} className="variant">
<div>{titre || name}</div>

View File

@ -117,7 +117,7 @@ let buildVariantTree = (allRules, path) => {
let node = findRuleByDottedName(allRules, path),
variant = isVariant(node),
variants = variant && R.unless(R.is(Array), R.prop('possibilités'))(variant),
shouldBeExpanded = variant && false, //variants.find( v => relevantPaths.find(rp => R.contains(path + ' . ' + v)(rp) )),
shouldBeExpanded = variant && true, //variants.find( v => relevantPaths.find(rp => R.contains(path + ' . ' + v)(rp) )),
canGiveUp = variant && !variant['choix obligatoire']
return Object.assign(

View File

@ -201,7 +201,7 @@ let treat = (rules, rule) => rawNode => {
'<=': 'lte',
'>': 'gt',
'>=': 'gte',
'=': 'equal'
'=': 'equals'
}[node.operator],
explanation = R.map(R.curry(evaluateNode)(situation,parsedRules),node.explanation),
value1 = explanation[0].nodeValue,