fix a type check in Ox.sum
This commit is contained in:
parent
d3ff222a04
commit
eab834a643
1 changed files with 1 additions and 1 deletions
|
@ -663,7 +663,7 @@ Ox.sum = function(col) {
|
||||||
col = arguments.length > 1 ? Ox.toArray(arguments) : col;
|
col = arguments.length > 1 ? Ox.toArray(arguments) : col;
|
||||||
Ox.forEach(col, function(val) {
|
Ox.forEach(col, function(val) {
|
||||||
val = +val;
|
val = +val;
|
||||||
sum += Ox.isNumber(val) ? val : 0;
|
sum += isFinite(val) ? val : 0;
|
||||||
});
|
});
|
||||||
return sum;
|
return sum;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue