fix: merge params on navigate in example

This commit is contained in:
satyajit.happy
2019-07-14 14:51:42 +02:00
parent 470a5a1d24
commit 86890b2b33
2 changed files with 13 additions and 4 deletions

View File

@@ -156,7 +156,13 @@ const StackRouter: Router<CommonAction | Action> = {
routes: [
...state.routes.slice(0, index),
action.payload.params !== undefined
? { ...state.routes[index], params: action.payload.params }
? {
...state.routes[index],
params: {
...state.routes[index].params,
...action.payload.params,
},
}
: state.routes[index],
],
};