fix a type check in Ox.sum

This commit is contained in:
rolux 2012-05-19 13:38:49 +04:00
parent d3ff222a04
commit eab834a643

View file

@ -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;
}; };