diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f6de96..7e4faf4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 13.2.2 + +- pageProps may be undefined on strange setups [#2109](https://github.com/i18next/next-i18next/issues/2109)" + ## 13.2.1 - types: fix serverSideTranslations args [#2104](https://github.com/i18next/next-i18next/pull/2104)" diff --git a/src/appWithTranslation.tsx b/src/appWithTranslation.tsx index 7d71215a..9489d3af 100644 --- a/src/appWithTranslation.tsx +++ b/src/appWithTranslation.tsx @@ -24,7 +24,7 @@ export const appWithTranslation = ( const AppWithTranslation = ( props: Props & { pageProps: Props['pageProps'] & SSRConfig } ) => { - const { _nextI18Next } = props.pageProps + const { _nextI18Next } = props.pageProps || {} // pageProps may be undefined on strange setups, i.e. https://github.com/i18next/next-i18next/issues/2109 let locale: string | undefined = _nextI18Next?.initialLocale ?? props?.router?.locale const ns = _nextI18Next?.ns