Skip to content

Commit

Permalink
using typeof for number checking instead
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Aug 13, 2011
1 parent 81692a2 commit 783f9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sugar.js
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 783f9ef

Please sign in to comment.