Permalink
Browse files

using typeof for number checking instead

  • Loading branch information...
1 parent 81692a2 commit 783f9ef137def6d9b9bafd059919fe4ab5187b67 @andrewplummer committed Aug 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sugar.js
View
@@ -1553,7 +1553,7 @@
this.each(function(el, i) {
if(Array.isArray(el)) {
result.push(el.compact());
- } else if(el !== undefined && el !== null && (!Object.isNumber(el) || !isNaN(el))) {
+ } else if(el !== undefined && el !== null && (typeof el != 'number' || !isNaN(el))) {
result.push(el);
}
});

0 comments on commit 783f9ef

Please sign in to comment.