From f046c0f6c2a616aa22b0c90350ec6fd04c5670c4 Mon Sep 17 00:00:00 2001 From: Frank Dai Date: Fri, 2 Feb 2018 11:13:05 -0800 Subject: [PATCH] Fixed the example with-react-intl, cannot read property 'locale' of undefined (#3392) --- examples/with-react-intl/components/PageWithIntl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/with-react-intl/components/PageWithIntl.js b/examples/with-react-intl/components/PageWithIntl.js index 108d76c5..1bcf0afd 100644 --- a/examples/with-react-intl/components/PageWithIntl.js +++ b/examples/with-react-intl/components/PageWithIntl.js @@ -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 // will be a new instance even with pushState routing.