From eee7ec7eec3be1d52529af8755c13514a3f68e4d Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 15:28:47 +0200 Subject: [PATCH] Affichage des exemples seulement s'ils sont visibles --- source/components/rule/Examples.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/components/rule/Examples.js b/source/components/rule/Examples.js index c8a8e1a21..a3a0c8c55 100644 --- a/source/components/rule/Examples.js +++ b/source/components/rule/Examples.js @@ -12,7 +12,7 @@ import "./Examples.css" export default class Examples extends Component { runExamples() { let { rule } = this.props, - exemples = rule.exemples || [] + {exemples=[]} = rule return exemples.map(ex => { @@ -41,6 +41,7 @@ export default class Examples extends Component { focusedExample = R.path(['focusedExample', 'nom'])(this.props), {inject, situationExists , showValues} = this.props + if (!examples.length) return null return (

Exemples de calcul

@@ -58,7 +59,7 @@ export default class Examples extends Component { : } {nom} - {!ok && focusedExample == nom && + {!ok && focusedExample == nom &&
Ce test ne passe pas {showValues &&