fix: merge initial params on replace

fixes 6792
This commit is contained in:
Satyajit Sahoo
2020-02-10 17:19:07 +01:00
parent 688d16de5d
commit 80629bf30b

View File

@@ -203,7 +203,13 @@ export default function StackRouter(options: StackRouterOptions) {
? {
key: key !== undefined ? key : `${name}-${shortid()}`,
name,
params,
params:
routeParamList[name] !== undefined
? {
...routeParamList[name],
...params,
}
: params,
}
: route
),