From f7539388433f0e6c1e7d1dfadae618745962703a Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 12 Apr 2022 11:16:34 +0200 Subject: [PATCH] fix(nuxt3): handle falsy page meta hotfix for #4273 --- packages/nuxt3/src/pages/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt3/src/pages/utils.ts b/packages/nuxt3/src/pages/utils.ts index 8d01d12024..42adf09586 100644 --- a/packages/nuxt3/src/pages/utils.ts +++ b/packages/nuxt3/src/pages/utils.ts @@ -237,7 +237,7 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set = ...Object.fromEntries(Object.entries(route).map(([key, value]) => [key, JSON.stringify(value)])), children: route.children ? normalizeRoutes(route.children, metaImports).routes : [], meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName, - alias: `${metaImportName}.alias || []`, + alias: `${metaImportName}?.alias || []`, component: genDynamicImport(file) } }))