Skip to content

Commit

Permalink
fix: page.name warning
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Oct 17, 2024
1 parent 10ab6a3 commit 1f719be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/page-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export class PageManager {

const additionalRoutes: NuxtPage[] = []
pages.forEach((page) => {
if (!page.name) {
console.warn(`[nuxt-i18n-next] Page name is missing for the file: ${page.file}`)
return
}
const customRoute = this.globalLocaleRoutes[page.name ?? ''] ?? null

// If globalLocaleRoutes for this page is false, skip localization
Expand Down

0 comments on commit 1f719be

Please sign in to comment.