mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +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
|
_legacyContext?: LegacyContext
|
||||||
|
|
||||||
ssrContext?: Record<string, any> & {
|
ssrContext?: Record<string, any> & {
|
||||||
renderMeta: () => Promise<NuxtMeta> | NuxtMeta
|
renderMeta?: () => Promise<NuxtMeta> | NuxtMeta
|
||||||
}
|
}
|
||||||
payload: {
|
payload: {
|
||||||
serverRendered?: true
|
serverRendered?: true
|
||||||
|
@ -82,7 +82,7 @@ async function renderHTML (payload, rendered, ssrContext) {
|
|||||||
const html = rendered.html
|
const html = rendered.html
|
||||||
|
|
||||||
if ('renderMeta' in ssrContext) {
|
if ('renderMeta' in ssrContext) {
|
||||||
rendered.meta = await ssrContext.renderMeta()
|
rendered.meta = await ssrContext.renderMeta?.()
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
Loading…
Reference in New Issue
Block a user