From b109bcc79076401402227ddfd9a582b30a67ea58 Mon Sep 17 00:00:00 2001 From: Justin Louie Date: Tue, 29 Mar 2016 17:30:30 +0800 Subject: [PATCH] Properly replace entire history stack - Fix for Issues #408 --- src/Reducer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Reducer.js b/src/Reducer.js index b3de575c6..ccc6c5736 100644 --- a/src/Reducer.js +++ b/src/Reducer.js @@ -52,7 +52,8 @@ function inject(state, action, props, scenes) { if (state.children[state.index].sceneKey == action.key){ return state; } - return {...state, children:[...state.children.slice(0,-1), getInitialState(props, scenes, state.index, action)]}; + // return {...state, children:[...state.children.slice(0,-1), getInitialState(props, scenes, state.index, action)]}; + return {...state, index:0, children:[getInitialState(props, scenes, state.index, action)]}; default: return state;