Permalink
Browse files

fix: isNumber判断

  • Loading branch information...
whizbz11 committed Jan 5, 2017
1 parent 2566ddf commit ebd1848f46b7b678059e5a09ee1ccc1fbc5c1997
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/util.js
View
@@ -54,7 +54,7 @@ var isDate = function(input) {
var isNumber = function(obj) {
//return obj === +obj
//加了个typeof 判断,因为'431027199110.078573'会解析成number
return (typeof obj ==='number') && (obj - parseFloat(obj) + 1 >= 0);
return obj - parseFloat(obj) + 1 >= 0;
};
var isArray = Array.isArray || function(val) {
return Object.prototype.toString.call(val) === '[object Array]';

0 comments on commit ebd1848

Please sign in to comment.