aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS.txt2
-rw-r--r--src/core.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 639ed4b64..62df6f5a5 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -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>
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;