Explorar o código

Merge branch 'nourguidara-fix-i18n-init-timing'

Lauri Ojansivu hai 1 mes
pai
achega
bb6910acd1
Modificáronse 1 ficheiros con 10 adicións e 7 borrados
  1. 10 7
      imports/i18n/index.js

+ 10 - 7
imports/i18n/index.js

@@ -2,13 +2,16 @@ import { TAPi18n } from './tap';
 import './accounts';
 import './moment';
 
-if (Meteor.isClient) {
-  import './blaze';
-}
-
 export { TAPi18n };
 
-(async () => {
-  await TAPi18n.init();
-})();
+if (Meteor.isClient) {
+  (async () => {
+    await import('./blaze');
+    await TAPi18n.init();
+  })();
+} else {
+  (async () => {
+    await TAPi18n.init();
+  })();
+}