Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: stringify values
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 2, 2022
1 parent 79bd077 commit bad0220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/pages/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set<string> =

return {
...Object.fromEntries(Object.entries(route).map(([key, value]) => [key, JSON.stringify(value)])),
name: `${metaImportName}?.name ?? ${route.name}`,
path: `${metaImportName}?.path ?? ${route.path}`,
name: `${metaImportName}?.name ?? ${route.name ? JSON.stringify(route.name) : 'undefined'}`,
path: `${metaImportName}?.path ?? ${JSON.stringify(route.path)}`,
children: route.children ? normalizeRoutes(route.children, metaImports).routes : [],
meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName,
alias: aliasCode,
Expand Down

0 comments on commit bad0220

Please sign in to comment.