diff --git a/src/Reducer.js b/src/Reducer.js index 369d46915..b3de575c6 100644 --- a/src/Reducer.js +++ b/src/Reducer.js @@ -34,9 +34,9 @@ function inject(state, action, props, scenes) { case POP_ACTION: return {...state, index:state.index-1, children:state.children.slice(0, -1) }; case REFRESH_ACTION: - // use key from state.key to avoid losing the index_ prefix during refresh - props.key = state.key; - return {...state, ...props}; + // use key and parent from state to avoid loss during refresh + let {key, parent} = state; + return {...state, ...props, key, parent}; case PUSH_ACTION: if (state.children[state.index].sceneKey == action.key && !props.clone){ return state;