aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js
index 844eb1593..5927d1936 100644
--- a/src/core.js
+++ b/src/core.js
@@ -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;