Skip to content

Commit

Permalink
hook: Add render:route hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Oct 30, 2017
1 parent fe0ad90 commit ad59f78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ad59f78

Please sign in to comment.