Commit d8298046 authored by Sebi Burkhard's avatar Sebi Burkhard Committed by Dave Methvin

Fix #13076. Speed up $() with strings, part of gh-1089.

parent 4de4be42
...@@ -156,4 +156,4 @@ Matthias Jäggli <matthias.jaeggli@gmail.com> ...@@ -156,4 +156,4 @@ Matthias Jäggli <matthias.jaeggli@gmail.com>
Yiming He <yiminghe@gmail.com> Yiming He <yiminghe@gmail.com>
Devin Cooper <cooper.semantics@gmail.com> Devin Cooper <cooper.semantics@gmail.com>
Bennett Sorbo <bsorbo@gmail.com> Bennett Sorbo <bsorbo@gmail.com>
Sebastian Burkhard <sebi.burkhard@gmail.com>
\ No newline at end of file
...@@ -96,8 +96,8 @@ jQuery.fn = jQuery.prototype = { ...@@ -96,8 +96,8 @@ jQuery.fn = jQuery.prototype = {
return this; return this;
} }
// HANDLE: $(DOMElement) // HANDLE: $(DOMElement); check first that selector is not a primitive
if ( selector.nodeType ) { if ( typeof selector === "object" && selector.nodeType ) {
this.context = this[0] = selector; this.context = this[0] = selector;
this.length = 1; this.length = 1;
return this; return this;
......
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