From 6da1a38eaf4a86480d91234ed29e4f667c3dda92 Mon Sep 17 00:00:00 2001 From: Joe Noon Date: Sat, 26 Mar 2016 02:23:15 -0700 Subject: [PATCH] also need to retain parent during refresh. maybe other properties also? --- src/Reducer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;