Skip to content

Commit 744e949

Browse files
authoredMar 17, 2025··
fix: nullable chain for getting locales (#49)
1 parent ea510b6 commit 744e949

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/module/src/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ declare global {
195195
// @ts-expect-error untyped
196196
const baseUrl = nuxt.options.i18n?.baseUrl
197197
// @ts-expect-error untyped
198-
const locale = nuxt.options.i18n?.locales.find(l => l.code === nuxt.options.i18n?.defaultLocale)
198+
const locale = nuxt.options.i18n?.locales?.find(l => l.code === nuxt.options.i18n?.defaultLocale)
199199
updateSiteConfig({
200200
_context: '@nuxtjs/i18n',
201201
url: typeof baseUrl === 'string' ? baseUrl : undefined,

0 commit comments

Comments
 (0)
Please sign in to comment.