🐛 Admettre qu'on ne peut pas calculer les 'une possibilité'
parent
8191379e9f
commit
65a78418ec
|
@ -18,7 +18,8 @@ export default class Algorithm extends React.Component {
|
|||
showValues: true
|
||||
}
|
||||
render(){
|
||||
let {traversedRule: rule, showValues} = this.props
|
||||
let {traversedRule: rule, showValues} = this.props,
|
||||
ruleWithoutFormula = !rule['formule'] || rule.formule.explanation['une possibilité']
|
||||
return (
|
||||
<div id="algorithm">
|
||||
<section id="rule-rules" className={classNames({showValues})}>
|
||||
|
@ -34,7 +35,7 @@ export default class Algorithm extends React.Component {
|
|||
}}
|
||||
<section id="formule">
|
||||
<h2>Calcul</h2>
|
||||
{rule['formule'] ? makeJsx(rule['formule']) : <RuleWithoutFormula />}
|
||||
{ruleWithoutFormula ? <RuleWithoutFormula /> : makeJsx(rule['formule'])}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue