Skip to content

Commit

Permalink
fix: double render due to wrong assertion (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
aseerkt committed Dec 29, 2023
1 parent 0d01be2 commit bd8ad11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/nextjs-babel/src/i18n.ts
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

1 comment on commit bd8ad11

@vercel
Copy link

@vercel vercel bot commented on bd8ad11 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.