Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use key from state.key to avoid losing the index_ prefix during refresh
  • Loading branch information
joenoon committed Mar 26, 2016
commit 37c1972c7bcc3f7659385ff536f38edb06852707
2 changes: 2 additions & 0 deletions src/Reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ 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};
case PUSH_ACTION:
if (state.children[state.index].sceneKey == action.key){
Expand Down