Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 9633954

Browse files
committed
fix safari render bug cause by intl
1 parent 1fa61b0 commit 9633954

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"cross-env": "^5.0.5",
8383
"debug": "^3.0.1",
8484
"glob": "^7.1.2",
85+
"intl": "^1.2.5",
8586
"isomorphic-fetch": "^2.2.1",
8687
"mobx": "3.2.2",
8788
"mobx-react": "^4.2.2",

pages/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import MultiLanguage from '../containers/MultiLanguage'
77
import Sidebar from '../containers/Sidebar'
88
import Body from '../containers/Body'
99

10+
// try to fix safari bug
11+
// see https://github.com/yahoo/react-intl/issues/422
12+
global.Intl = require('intl')
13+
1014
export default class Index extends React.Component {
1115
static getInitialProps({ req }) {
1216
const isServer = !!req

yarn.lock

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,6 +3108,10 @@ intl-relativeformat@^1.3.0:
31083108
dependencies:
31093109
intl-messageformat "1.3.0"
31103110

3111+
intl@^1.2.5:
3112+
version "1.2.5"
3113+
resolved "http://r.cnpmjs.org/intl/download/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde"
3114+
31113115
invariant@^2.1.1, invariant@^2.2.0, invariant@^2.2.2:
31123116
version "2.2.2"
31133117
resolved "http://r.cnpmjs.org/invariant/download/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
@@ -5120,9 +5124,9 @@ react-world-flags@^0.0.3:
51205124
svg-country-flags "^1.0.0"
51215125
world-countries "^1.8.1"
51225126

5123-
react@15.6.1:
5124-
version "15.6.1"
5125-
resolved "http://r.cnpmjs.org/react/download/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"
5127+
react@15.6.2:
5128+
version "15.6.2"
5129+
resolved "http://r.cnpmjs.org/react/download/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72"
51265130
dependencies:
51275131
create-react-class "^15.6.0"
51285132
fbjs "^0.8.9"

0 commit comments

Comments
 (0)