Skip to content

Commit

Permalink
fix: ignore empty lang value #1162
Browse files Browse the repository at this point in the history
  • Loading branch information
timotew authored Oct 25, 2023
1 parent 38524fa commit 264e870
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 264e870

Please sign in to comment.