diff --git a/examples/with-amp/nuxt.config.js b/examples/with-amp/nuxt.config.js index f45837119e..75986508b4 100644 --- a/examples/with-amp/nuxt.config.js +++ b/examples/with-amp/nuxt.config.js @@ -31,7 +31,7 @@ module.exports = { page.html = modifyHtml(page.html) }, // This hook is called before rendering the html to the browser - 'render:route': (url, page) => { + 'render:route': (req, page) => { page.html = modifyHtml(page.html) } } diff --git a/lib/core/middleware/nuxt.js b/lib/core/middleware/nuxt.js index bc80a99bcf..3ab2be4bfb 100644 --- a/lib/core/middleware/nuxt.js +++ b/lib/core/middleware/nuxt.js @@ -10,7 +10,7 @@ module.exports = async function nuxtMiddleware(req, res, next) { res.statusCode = 200 try { const result = await this.renderRoute(req.url, context) - await this.nuxt.callHook('render:route', req.url, result) + await this.nuxt.callHook('render:route', req, result) const { html, cspScriptSrcHashes,