diff --git a/lib/render.js b/lib/render.js index 105b3dc352..59f9199dc7 100644 --- a/lib/render.js +++ b/lib/render.js @@ -54,11 +54,12 @@ export function render (req, res) { /* istanbul ignore if */ if (this.dev && req.url.indexOf(self.options.build.publicPath) === 0 && req.url.includes('.hot-update.json')) { res.statusCode = 404 - return res.end() + return { html: '' } } return this.renderRoute(req.url, context) }) - .then(({ html, error }) => { + .then(({ html, error, redirected }) => { + if (redirected) return html if (error) { res.statusCode = context.nuxt.error.statusCode || 500 }