Skip to content

Commit

Permalink
fix useSSR ns copy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Feb 18, 2020
1 parent 69ddc66 commit 0828bfa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 11.3.3

- fixes copying ns in useSSR

### 11.3.2

- typescript: Add optional defaultN [1050](https://github.com/i18next/react-i18next/pull/1050)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-i18next",
"version": "11.3.2",
"version": "11.3.3",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",
"main": "dist/commonjs/index.js",
"types": "src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@

i18n.options.ns = Object.values(initialI18nStore).reduce(function (mem, lngResources) {
Object.keys(lngResources).forEach(function (ns) {
if (mem.indexOf(ns) < -1) mem.push(ns);
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
Expand Down
2 changes: 1 addition & 1 deletion react-i18next.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/useSSR.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function useSSR(initialI18nStore, initialLanguage, props = {}) {
// add namespaces to the config - so a languageChange call loads all namespaces needed
i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
Object.keys(lngResources).forEach(ns => {
if (mem.indexOf(ns) < -1) mem.push(ns);
if (mem.indexOf(ns) < 0) mem.push(ns);
});
return mem;
}, i18n.options.ns);
Expand Down

0 comments on commit 0828bfa

Please sign in to comment.