next-i18next
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -183,3 +183,8 @@ "use strict"; | ||
_context.next = 30; | ||
if (!(process.env.NODE_ENV === 'production')) { | ||
_context.next = 31; | ||
break; | ||
} | ||
_context.next = 31; | ||
return (0, _reactTreeWalker.default)(tree, function (element, instance) { | ||
@@ -191,5 +196,5 @@ if (instance && instance.props && instance.props.ns) { | ||
case 30: | ||
case 31: | ||
if (!(req && req.i18n)) { | ||
_context.next = 35; | ||
_context.next = 36; | ||
break; | ||
@@ -204,12 +209,12 @@ } | ||
}); | ||
_context.next = 39; | ||
_context.next = 40; | ||
break; | ||
case 35: | ||
case 36: | ||
if (!(Array.isArray(i18n.languages) && i18n.languages.length > 0)) { | ||
_context.next = 39; | ||
_context.next = 40; | ||
break; | ||
} | ||
_context.next = 38; | ||
_context.next = 39; | ||
return Promise.all(nsFromTree.filter(function (ns) { | ||
@@ -225,6 +230,6 @@ return !i18n.hasResourceBundle(i18n.languages[0], ns); | ||
case 38: | ||
case 39: | ||
initialI18nStore = i18n.store.data; | ||
case 39: | ||
case 40: | ||
return _context.abrupt("return", (0, _objectSpread2.default)({ | ||
@@ -236,3 +241,3 @@ initialI18nStore: initialI18nStore, | ||
case 40: | ||
case 41: | ||
case "end": | ||
@@ -239,0 +244,0 @@ return _context.stop(); |
@@ -18,2 +18,3 @@ "use strict"; | ||
this.i18n.nsFromReactTree = (0, _toConsumableArray2.default)(new Set(this.i18n.nsFromReactTree.concat(namespaces))); | ||
options.i18n = this.i18n; | ||
return (0, _reactI18next.withNamespaces)(namespaces, options); | ||
@@ -20,0 +21,0 @@ } |
{ | ||
"name": "next-i18next", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:isaachinman/next-i18next.git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204704
675
2