Skip to content

Commit

Permalink
Fix #13076. Speed up $() with strings, part of gh-1089.
Browse files Browse the repository at this point in the history
  • Loading branch information
hasclass authored and dmethvin committed Dec 23, 2012
1 parent 4de4be4 commit d829804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.txt
Expand Up @@ -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>
Sebastian Burkhard <sebi.burkhard@gmail.com>
4 changes: 2 additions & 2 deletions src/core.js
Expand Up @@ -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;
Expand Down

0 comments on commit d829804

Please sign in to comment.