Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Feb 7, 2019
1 parent 79d93a1 commit 7b62c3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-i18next",
"version": "10.0.0",
"version": "10.0.1",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"types": "src/index.d.ts",
Expand Down
12 changes: 10 additions & 2 deletions react-i18next.js
Expand Up @@ -611,7 +611,12 @@

if (!i18n) {
warnOnce('You will need pass in an i18next instance by using i18nextReactModule');
return [k => k, {}];
const retNotReady = [k => k, {}];

retNotReady.t = k => k;

retNotReady.i18n = {};
return retNotReady;
}

const i18nOptions = getDefaults(); // prepare having a namespace
Expand Down Expand Up @@ -663,7 +668,10 @@
// not yet loaded namespaces -> load them -> and trigger suspense

if (ready) {
return [t.t, i18n];
const ret = [t.t, i18n];
ret.t = t.t;
ret.i18n = i18n;
return ret;
}

throw new Promise(resolve => {
Expand Down

0 comments on commit 7b62c3d

Please sign in to comment.