refactor: rehydrate only once

This commit is contained in:
satyajit.happy
2019-07-24 11:20:13 +02:00
parent d6501d3e5d
commit 049d03f321
5 changed files with 30 additions and 30 deletions

View File

@@ -91,7 +91,7 @@ function StackRouter(options: DefaultRouterOptions) {
};
},
getRehydratedState({ key, routeNames, partialState }) {
getRehydratedState({ routeNames, partialState }) {
let state = partialState;
if (state.stale) {
@@ -99,7 +99,7 @@ function StackRouter(options: DefaultRouterOptions) {
...state,
stale: false,
routeNames,
key,
key: `stack-${shortid()}`,
};
}