added redirect check
This commit is contained in:
parent
a5e026c1e0
commit
9fea56c8a2
1 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,14 @@ module.exports = (req, res) => {
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// check for a redirect
|
||||||
|
if (context.url) {
|
||||||
|
// Somewhere a `<Redirect>` was rendered
|
||||||
|
res.redirect(301, context.url);
|
||||||
|
} else {
|
||||||
|
// we're good, send the response
|
||||||
|
}
|
||||||
|
|
||||||
// get the initial state from our Redux store
|
// get the initial state from our Redux store
|
||||||
const preloadedState = store.getState();
|
const preloadedState = store.getState();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue