Skip to content

Commit

Permalink
fix: ignore empty lang value #1162 (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotew authored and aralroca committed Apr 8, 2024
1 parent 20c1975 commit 65bb290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/createTranslation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import wrapTWithDefaultNs from './wrapTWithDefaultNs'
export default function createTranslation(defaultNS?: string) {
const { lang, namespaces, config } = globalThis.__NEXT_TRANSLATE__ ?? {}
const localesToIgnore = config.localesToIgnore || ['default']
const ignoreLang = localesToIgnore.includes(lang)
const ignoreLang = !lang || localesToIgnore.includes(lang)
const t = transCore({
config,
allNamespaces: namespaces,
Expand Down

0 comments on commit 65bb290

Please sign in to comment.