Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect doesn't work #8

Open
a-barbieri opened this issue Jul 31, 2018 · 1 comment
Open

Redirect doesn't work #8

a-barbieri opened this issue Jul 31, 2018 · 1 comment

Comments

@a-barbieri
Copy link

Hi,

the current configuration of server/index.js doesn't handle redirection in the correct way.

For example, if you try to add <Redirect from="/favourite-playlist" to="/playlists/pl-funk" /> among the available routes the client side will render the redirect properly, whereas the server side will not react to the redirect showing an empty page.

If you debug the code, renderToNodeStream(appWithRouter) at line 57 isn't rendering anything.

My guess is that this lines are in the wrong place:

if (context.url) {
   res.redirect(context.url);
   return;
}
@a-barbieri
Copy link
Author

I've made a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant