Commit 2a6b0ee7 authored by John Resig's avatar John Resig

Fixed two quick bugs from the JSLint overhaul.

parent d71a8500
...@@ -43,7 +43,7 @@ function $(a,c) { ...@@ -43,7 +43,7 @@ function $(a,c) {
// The only two getters // The only two getters
size: function() {return this.get().length;}, size: function() {return this.get().length;},
get: function(i) { get: function(i) {
return i === null ? this.cur : this.cur[i]; return typeof i == 'undefined' ? this.cur : this.cur[i];
}, },
each: function(f) { each: function(f) {
...@@ -620,7 +620,7 @@ $.filter = function(t,r,not) { ...@@ -620,7 +620,7 @@ $.filter = function(t,r,not) {
} }
if ( f !== null ) { if ( f !== null ) {
f = new Function('a','i','return ' + f); eval('f = function(a,i){return ' + f + '}');
r = g( r, f ); r = g( r, f );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment