diff --git a/source/components/SalaryExplanation.js b/source/components/SalaryExplanation.js index 08c3d5a49..853ef19b6 100644 --- a/source/components/SalaryExplanation.js +++ b/source/components/SalaryExplanation.js @@ -1,14 +1,14 @@ -import { startConversation } from 'Actions/actions'; -import withTracker from 'Components/utils/withTracker'; -import { compose } from 'ramda'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { formValueSelector } from 'redux-form'; -import ficheDePaieSelectors from 'Selectors/ficheDePaieSelectors'; -import * as Animate from 'Ui/animate'; -import SalaryCompactExplanation from './SalaryCompactExplanation'; -import './SalaryCompactExplanation.css'; -import SalaryFirstExplanation from './SalaryFirstExplanation'; +import { startConversation } from 'Actions/actions' +import withTracker from 'Components/utils/withTracker' +import { compose } from 'ramda' +import React, { Component } from 'react' +import { connect } from 'react-redux' +import { formValueSelector } from 'redux-form' +import ficheDePaieSelectors from 'Selectors/ficheDePaieSelectors' +import * as Animate from 'Ui/animate' +import SalaryCompactExplanation from './SalaryCompactExplanation' +import './SalaryCompactExplanation.css' +import SalaryFirstExplanation from './SalaryFirstExplanation' export default compose( withTracker, diff --git a/source/components/Simulation.js b/source/components/Simulation.js index 8e3bb4b27..5ba2c99a2 100644 --- a/source/components/Simulation.js +++ b/source/components/Simulation.js @@ -7,7 +7,6 @@ import { compose } from 'ramda' import { connect } from 'react-redux' import { nextStepsSelector, - noUserInputSelector, noUserInputSelector } from 'Selectors/analyseSelectors' import Animate from 'Ui/animate' @@ -20,8 +19,7 @@ export default compose( previousAnswers: state.conversationSteps.foldedSteps, noNextSteps: state.conversationStarted && nextStepsSelector(state).length == 0, - noUserInput: noUserInputSelector(state), - userInput: !noUserInputSelector(state) + noUserInput: noUserInputSelector(state) }), { resetSimulation } ) diff --git a/source/selectors/regleSelectors.js b/source/selectors/regleSelectors.js index 462652a8e..94598b86e 100644 --- a/source/selectors/regleSelectors.js +++ b/source/selectors/regleSelectors.js @@ -72,6 +72,8 @@ export const règleValeurSelector: InputSelector< (analysis.cache[dottedName] || analysis.targets.find(target => target.dottedName === dottedName)) + if (rule == undefined) return null + let valeur = rule && !isNil(rule.nodeValue) ? rule.nodeValue @@ -103,6 +105,7 @@ export const règleValeurSelector: InputSelector< (!Number.isNaN(valeur) && Number.isNaN(Number.parseFloat(valeur)) ? 'string' : 'number') + return { type, valeur: