This commit is contained in:
@@ -270,7 +270,7 @@ export default {
|
||||
}
|
||||
|
||||
//A number already then parse and return
|
||||
if (window.$gz._.isNumber(string)) {
|
||||
if (this.isNumeric(string)) {
|
||||
if (string === NaN) {
|
||||
return 0;
|
||||
}
|
||||
@@ -459,6 +459,13 @@ export default {
|
||||
while (start < end && str[start] === ch) ++start;
|
||||
while (end > start && str[end - 1] === ch) --end;
|
||||
return start > 0 || end < str.length ? str.substring(start, end) : str;
|
||||
},
|
||||
///////////////////////////////////////////////
|
||||
// is numeric replacement for lodash
|
||||
// https://stackoverflow.com/a/52986361/8939
|
||||
//
|
||||
isNumeric: function(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user