fix(app): make renderMeta optional (#340)

This commit is contained in:
Daniel Roe 2021-07-19 14:27:20 +01:00 committed by GitHub
parent 98cf97d269
commit 64d3585959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export interface Nuxt {
_legacyContext?: LegacyContext
ssrContext?: Record<string, any> & {
renderMeta: () => Promise<NuxtMeta> | NuxtMeta
renderMeta?: () => Promise<NuxtMeta> | NuxtMeta
}
payload: {
serverRendered?: true

View File

@ -82,7 +82,7 @@ async function renderHTML (payload, rendered, ssrContext) {
const html = rendered.html
if ('renderMeta' in ssrContext) {
rendered.meta = await ssrContext.renderMeta()
rendered.meta = await ssrContext.renderMeta?.()
}
const {