intelicoreact 1.0.89 → 1.0.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,12 +37,14 @@ function createTranslator(_ref) {
37
37
  var code = window.localStorage.getItem('lng');
38
38
  if (!code) code = window.navigator ? window.navigator.language.split('-')[0] : DEFAULT_CODE;
39
39
  if (!loc[code]) code = DEFAULT_CODE;
40
- return function (text) {
41
- var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
40
+ return function (text, values) {
41
+ var _Object$keys;
42
+
43
+ var safelyValues = values !== null && values !== void 0 ? values : {};
42
44
  var safelyText = (0, _fieldValueFormatters.getSafelyValue)(text);
43
45
  var translatedText = loc[code] && loc[code][safelyText] ? loc[code][safelyText] : safelyText;
44
46
 
45
- if (Object.keys(values).length) {
47
+ if ((_Object$keys = Object.keys(safelyValues)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
46
48
  for (var key in values) {
47
49
  var _translatedText;
48
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [