diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js
index 0773dd8ca..266e763d7 100644
--- a/source/components/TargetSelection.js
+++ b/source/components/TargetSelection.js
@@ -39,8 +39,8 @@ import { Circle } from 'rc-progress'
)
export default class TargetSelection extends Component {
render() {
- let { targets, conversationStarted, colours } = this.props
- this.firstEstimationComplete = this.props.activeInput && targets.length > 0
+ let { targets, conversationStarted, colours, activeInput } = this.props
+ this.firstEstimationComplete = activeInput && targets.length > 0
return (
(
'SET_CONVERSATION_TARGETS',
STEP_ACTION,
'USER_INPUT_UPDATE',
- 'START_CONVERSATION'
+ 'START_CONVERSATION',
+ 'SET_ACTIVE_TARGET_INPUT'
].includes(action.type)
)
return state
- if (path(['form', 'conversation', 'syncErrors'], state)) return state
+ if (
+ path(['form', 'conversation', 'syncErrors'], state) ||
+ !answerSource(state)(state.activeTargetInput)
+ )
+ return state
let targetNames = reject(
name => state.activeTargetInput && state.activeTargetInput.includes(name)
@@ -100,7 +105,7 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (
: state.foldedSteps
}
- if (action.type == 'START_CONVERSATION')
+ if (['START_CONVERSATION', 'SET_ACTIVE_TARGET_INPUT'].includes(action.type))
return {
...newState,
missingVariablesByTarget: {