We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a0e650 + f2ef83e commit f129b6eCopy full SHA for f129b6e
src/core/i18n/utils.js
@@ -1,4 +1,4 @@
1
-/* global Intl */
+/* global Intl, window */
2
/* @flow */
3
import config from 'config';
4
import Jed from 'jed';
@@ -246,7 +246,7 @@ export function makeI18n(
246
i18nData: I18nConfig,
247
lang: string,
248
_Jed: Jed = Jed,
249
- { _Intl = Intl }: makeI18nOptions = {}
+ { _Intl = typeof window !== 'undefined' ? window.Intl : Intl }: makeI18nOptions = {}
250
) {
251
const i18n = new _Jed(i18nData);
252
i18n.lang = lang;
0 commit comments