Skip to content

Commit

Permalink
fix: double render due to wrong assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
aseerkt committed Dec 29, 2023
1 parent 0d01be2 commit 1b19cf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nextjs-babel/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function useLinguiInit(messages: Messages) {
// to avoid calling loadAndActivate for (worst case) each request, but right now that's what we do
i18n.loadAndActivate({ locale, messages })
}
if (isClient && i18n.locale === undefined) {
if (isClient && !i18n.locale) {
// first client render
i18n.loadAndActivate({ locale, messages })
}
Expand Down

0 comments on commit 1b19cf4

Please sign in to comment.