Skip to content

Commit

Permalink
Merge pull request #399 from joenoon/jn-fixRefresh1
Browse files Browse the repository at this point in the history
use key from state.key to avoid losing the index_ prefix during refresh
  • Loading branch information
aksonov committed Mar 26, 2016
2 parents 3d77b93 + 37c1972 commit 38985d6
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 38985d6

Please sign in to comment.