Unverified Commit c8e1e141 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Make sure renderOpts is available before checking (#8734)

* Make sure renderOpts is available before checking

* Apply suggestions from code review
Co-Authored-By: 's avatarJoe Haddad <joe.haddad@zeit.co>

* Update check
parent 5c83684b
...@@ -111,7 +111,7 @@ export default async function ({ ...@@ -111,7 +111,7 @@ export default async function ({
(page === '/' ? 'index' : page) + '.js' (page === '/' ? 'index' : page) + '.js'
)).renderReqToHTML )).renderReqToHTML
const result = await renderMethod(req, res, true) const result = await renderMethod(req, res, true)
curRenderOpts = result.renderOpts curRenderOpts = result.renderOpts || {}
html = result.html html = result.html
} else { } else {
const components = await loadComponents( const components = await loadComponents(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment