mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(app): make renderMeta
optional (#340)
This commit is contained in:
parent
98cf97d269
commit
64d3585959
@ -26,7 +26,7 @@ export interface Nuxt {
|
||||
_legacyContext?: LegacyContext
|
||||
|
||||
ssrContext?: Record<string, any> & {
|
||||
renderMeta: () => Promise<NuxtMeta> | NuxtMeta
|
||||
renderMeta?: () => Promise<NuxtMeta> | NuxtMeta
|
||||
}
|
||||
payload: {
|
||||
serverRendered?: true
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user