🐛 Corrige le retour des extraSteps lors du double unfold
parent
3337c91df6
commit
4a5b134074
|
@ -99,8 +99,9 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (state, action) =
|
|||
let previous = state.currentQuestion,
|
||||
answered = previous && (answerSource(state)(previous) != undefined),
|
||||
foldable = answered ? [previous] : [],
|
||||
foldedSteps = R.without([action.step])(R.concat(state.foldedSteps, foldable)),
|
||||
extraSteps = R.without([action.step], state.extraSteps)
|
||||
foldedSteps = R.without([action.step], R.concat(state.foldedSteps, foldable)),
|
||||
fromExtra = !answered && R.contains(previous, R.keys(softAssumptions)),
|
||||
extraSteps = R.without([action.step], fromExtra ? R.concat(state.extraSteps, [previous]) : state.extraSteps)
|
||||
|
||||
return {
|
||||
...newState,
|
||||
|
|
Loading…
Reference in New Issue