aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2012-12-10 20:19:26 -0500
committerRick Waldron <waldron.rick@gmail.com>2012-12-10 20:19:26 -0500
commit3c7f2af81d877b24a5e5b6488e78621fcf96b265 (patch)
tree00787f6bad86a8227dac2aaba0e3626d216ea493 /src
parent07a7b3e4cf961e51bddcdb90cdca34f9126ed286 (diff)
downloadjquery-3c7f2af81d877b24a5e5b6488e78621fcf96b265.tar.gz
jquery-3c7f2af81d877b24a5e5b6488e78621fcf96b265.zip
Be specific about Firefox nodes-as-nodelist. Never assume that modern browsers will "get it right".
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/core.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core.js b/src/core.js
index 9832daa59..5db9b5e82 100644
--- a/src/core.js
+++ b/src/core.js
@@ -919,6 +919,10 @@ function isArraylike( obj ) {
return false;
}
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
return type === "array" || type !== "function" &&
( length === 0 ||
typeof length === "number" && length > 0 && ( length - 1 ) in obj );