That would seem to imply that the length property of the object is "1" -- can you confirm that? If not, it's *not* [undefined].
-- Yehuda
<div><span class="gmail_quote">On 12/31/06, <b class="gmail_sendername">
Mike Alsup</b> <<a href="mailto:malsup@gmail.com">
malsup@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've been trying to chase down a problem with one of my unit tests.
The issue is that evalScripts is executing and appears to find a
script tag where none exists. Looking further, it seems that 'find'
never returns a jQuery object of size 0. For cases like the one I was
testing, where no match exists, find returns a jQuery object like
this: [undefined]. That is, it has a size of 1 but element 0 is
undefined.
Things work fine in 1.0.4, but in the current SVN code the following happens:
// alerts 1 (should be 0)
alert($('no-such-tag', this).length);
// alerts 'undefined'
alert($('no-such-tag', this)[0]);
Mike
_______________________________________________
Jquery-dev mailing list
<a href="mailto:Jquery-dev@bassistance.de">
Jquery-dev@bassistance.de</a>
<a href="http://lists.bassistance.de/mailman/listinfo/jquery-dev">
http://lists.bassistance.de/mailman/listinfo/jquery-dev</a>
</blockquote></div>
<br clear="all">
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________
Jquery-dev mailing list
Jquery-dev@bassistance.dehttp://lists.bassistance.de/mailman/listinfo/jquery-dev