mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
hook: Add render:route hook
This commit is contained in:
parent
fe0ad908b7
commit
ad59f788dc
@ -283,7 +283,10 @@ export default class Renderer {
|
||||
|
||||
res.statusCode = 200
|
||||
try {
|
||||
const { html, error, redirected, resourceHints } = await this.renderRoute(req.url, context)
|
||||
const result = await this.renderRoute(req.url, context)
|
||||
await this.nuxt.callHook('render:route', req.url, result)
|
||||
const { html, error, redirected, resourceHints } = result
|
||||
|
||||
if (redirected) {
|
||||
return html
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user