Fix page not loading with ending the request (#6546)
This commit is contained in:
parent
abad29b413
commit
0a4f0e6356
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ Profile.getInitialProps = async ctx => {
|
|||
const redirectOnError = () =>
|
||||
process.browser
|
||||
? Router.push('/login')
|
||||
: ctx.res.writeHead(301, { Location: '/login' })
|
||||
: ctx.res.writeHead(301, { Location: '/login' }).end()
|
||||
|
||||
try {
|
||||
const response = await fetch(apiUrl, {
|
||||
|
|
Loading…
Reference in a new issue