Skip to content

Commit 38985d6

Browse files
committed
Merge pull request #399 from joenoon/jn-fixRefresh1
use key from state.key to avoid losing the index_ prefix during refresh
2 parents 3d77b93 + 37c1972 commit 38985d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Reducer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function inject(state, action, props, scenes) {
3434
case POP_ACTION:
3535
return {...state, index:state.index-1, children:state.children.slice(0, -1) };
3636
case REFRESH_ACTION:
37+
// use key from state.key to avoid losing the index_ prefix during refresh
38+
props.key = state.key;
3739
return {...state, ...props};
3840
case PUSH_ACTION:
3941
if (state.children[state.index].sceneKey == action.key){

0 commit comments

Comments
 (0)