Commit 4b6bcb23 authored by John Resig's avatar John Resig

Fixed another bug with retreiving elements by ID.

parent b5256cae
...@@ -523,7 +523,7 @@ $.Select = function( t, context ) { ...@@ -523,7 +523,7 @@ $.Select = function( t, context ) {
if ( m[1] == "#" ) { // Ummm, should make this work in all XML docs if ( m[1] == "#" ) { // Ummm, should make this work in all XML docs
var oid = document.getElementById(m[2]); var oid = document.getElementById(m[2]);
r = oid ? [oid] : []; r = ret = oid ? [oid] : [];
t = t.replace( re2, "" ); t = t.replace( re2, "" );
} else { } else {
if ( m[2] === "" || m[1] == "." ) { m[2] = "*"; } if ( m[2] === "" || m[1] == "." ) { m[2] = "*"; }
...@@ -564,6 +564,7 @@ $.Select = function( t, context ) { ...@@ -564,6 +564,7 @@ $.Select = function( t, context ) {
if ( ret && ret[0] == context ) { ret.shift(); } if ( ret && ret[0] == context ) { ret.shift(); }
done = $.merge( done, ret ); done = $.merge( done, ret );
return done; return done;
}; };
......
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