From 4a44653b7e5defc92e08648be8f7228df8bec2e4 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 12 Apr 2018 14:30:12 +0200 Subject: [PATCH] :bug: Rule.js a besoin de parsedRule pas flatRule --- source/components/RulePage.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/components/RulePage.js b/source/components/RulePage.js index f7580829c..bd46915f1 100644 --- a/source/components/RulePage.js +++ b/source/components/RulePage.js @@ -19,7 +19,7 @@ import { Namespace } from './rule/Rule' @connect(state => ({ situationGate: state.situationGate, - flatRules: state.flatRules, + parsedRules: state.parsedRules, analysis: state.analysis })) @translate() @@ -37,23 +37,23 @@ export default class RulePage extends Component { } } setRule(name) { - let { flatRules, situationGate } = this.props, + let { parsedRules, situationGate } = this.props, decodedRuleName = decodeRuleName(name) if (decodedRuleName.includes(' . ')) { - let rule = findRuleByDottedName(flatRules, decodedRuleName) + let rule = findRuleByDottedName(parsedRules, decodedRuleName) this.rule = rule && - head(analyse(flatRules, rule.dottedName)(situationGate).targets) + head(analyse(parsedRules, rule.dottedName)(situationGate).targets) this.multipleMatchingRules = false return } let ruleName = nameLeaf(decodeRuleName(name)), - rules = findRulesByName(flatRules, ruleName) + rules = findRulesByName(parsedRules, ruleName) if (!rules.length) return null if (rules.length > 1) this.multipleMatchingRules = rules this.rule = head( - analyse(flatRules, head(rules).dottedName)(situationGate).targets + analyse(parsedRules, head(rules).dottedName)(situationGate).targets ) } render() {