未验证 提交 db82f9ce 编写于 作者: I Ilya Lebedev 提交者: GitHub

[Example] with-react-intl: fix doubling messages (#17175)

Because `import()` for .json files return object like this:

```json
{
  "default": {
     "some": ...
  },
 "some": ...
}
```

![image](https://user-images.githubusercontent.com/2598671/93468826-4156b200-f8f8-11ea-8e39-42df2df83057.png)
上级 231016f6
......@@ -71,7 +71,11 @@ const getInitialProps: typeof App.getInitialProps = async appContext => {
App.getInitialProps(appContext),
]);
return {...(appProps as any), locale: supportedLocale, messages};
return {
...(appProps as any),
locale: supportedLocale,
messages: messages.default,
};
};
MyApp.getInitialProps = getInitialProps;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册