x25 5.1.23 → 5.1.24

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.
@@ -49,7 +49,7 @@ var NumericInput = exports.NumericInput = function NumericInput(props) {
49
49
 
50
50
  var valueToStore = targetValue;
51
51
 
52
- if ((0, _common.isFloat)(targetValue)) {
52
+ if ((0, _common.isFloat)((0, _common.floatToEnglishComma)(targetValue))) {
53
53
  valueToStore = (0, _common.getFloatValueToStore)(targetValue);
54
54
  }
55
55
 
@@ -53,7 +53,7 @@ var NumericTemplate = exports.NumericTemplate = function NumericTemplate(props)
53
53
 
54
54
  var valueToStore = targetValue;
55
55
 
56
- if ((0, _common.isFloat)(targetValue)) {
56
+ if ((0, _common.isFloat)((0, _common.floatToEnglishComma)(targetValue))) {
57
57
  valueToStore = (0, _common.getFloatValueToStore)(targetValue);
58
58
  }
59
59
 
package/Inputs/common.js CHANGED
@@ -8,14 +8,14 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [
8
8
 
9
9
  /* eslint-disable require-unicode-regexp */
10
10
 
11
- var floatToEnglishComma = function floatToEnglishComma(raw) {
12
- return String(raw).replace(",", ".");
13
- },
14
- floatToLocalComma = function floatToLocalComma(raw) {
11
+ var floatToLocalComma = function floatToLocalComma(raw) {
15
12
  return String(raw).replace(".", ",");
16
13
  };
17
14
 
18
- var isFloat = exports.isFloat = function isFloat(raw) {
15
+ var floatToEnglishComma = exports.floatToEnglishComma = function floatToEnglishComma(raw) {
16
+ return String(raw).replace(",", ".");
17
+ },
18
+ isFloat = exports.isFloat = function isFloat(raw) {
19
19
  var floatRegex = /^-?\d+(?:[.]\d*?)?$/;
20
20
 
21
21
  return floatRegex.test(raw);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.23",
2
+ "version": "5.1.24",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "scripts": {
@@ -142,4 +142,4 @@
142
142
  "reselect": "^4.0.0",
143
143
  "superagent": "^5.1.1"
144
144
  }
145
- }
145
+ }