mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fixed the example with-react-intl, cannot read property 'locale' of undefined (#3392)
This commit is contained in:
parent
54ae432369
commit
f046c0f6c2
|
@ -23,7 +23,7 @@ export default (Page) => {
|
|||
// Get the `locale` and `messages` from the request object on the server.
|
||||
// In the browser, use the same values that the server serialized.
|
||||
const {req} = context
|
||||
const {locale, messages} = req || window.__NEXT_DATA__.props.initialProps
|
||||
const {locale, messages} = req || window.__NEXT_DATA__.props
|
||||
|
||||
// Always update the current time on page load/transition because the
|
||||
// <IntlProvider> will be a new instance even with pushState routing.
|
||||
|
|
Loading…
Reference in a new issue