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