From: John Resig Date: Tue, 16 May 2006 22:32:15 +0000 (+0000) Subject: Fixed two quick bugs from the JSLint overhaul. X-Git-Tag: 1.0a~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a6b0ee7c846d5bdd535dcc9a399d528f65460ac;p=jquery.git Fixed two quick bugs from the JSLint overhaul. --- diff --git a/jquery/jquery.js b/jquery/jquery.js index bd25ed205..e9db33d1f 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -43,7 +43,7 @@ function $(a,c) { // The only two getters size: function() {return this.get().length;}, get: function(i) { - return i === null ? this.cur : this.cur[i]; + return typeof i == 'undefined' ? this.cur : this.cur[i]; }, each: function(f) { @@ -620,7 +620,7 @@ $.filter = function(t,r,not) { } if ( f !== null ) { - f = new Function('a','i','return ' + f); + eval('f = function(a,i){return ' + f + '}'); r = g( r, f ); } }