]> source.dussan.org Git - jquery.git/commitdiff
reverted change for #2114
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 14 Jan 2008 09:42:53 +0000 (09:42 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 14 Jan 2008 09:42:53 +0000 (09:42 +0000)
src/core.js

index 5e807750e89861778d4e92a59a4561f0a21580ed..4a4ff95d48f409bd10ac1c599fe357c3863eb464 100644 (file)
@@ -38,7 +38,7 @@ jQuery.fn = jQuery.prototype = {
                selector = selector || document;\r
 \r
                // Handle $(DOMElement)\r
-               if ( selector.nodeType && !selector.length ) {\r
+               if ( selector.nodeType ) {\r
                        this[0] = selector;\r
                        this.length = 1;\r
                        return this;\r
@@ -93,7 +93,7 @@ jQuery.fn = jQuery.prototype = {
 \r
                        // HANDLE: $(arraylike)\r
                        // Watch for when an array-like object, contains DOM nodes, is passed in as the selector\r
-                       (selector.jquery || selector.length && selector != window && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||\r
+                       (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||\r
 \r
                        // HANDLE: $(*)\r
                        [ selector ] );\r