mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fixed another bug with retreiving elements by ID.
This commit is contained in:
parent
b5256caee6
commit
4b6bcb235f
3
jquery/jquery.js
vendored
3
jquery/jquery.js
vendored
@ -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 ) {
|
|||||||
|
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user