aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-04-04 15:34:07 -0400
committerTimmy Willison <timmywillisn@gmail.com>2015-04-29 18:02:45 -0400
commit154166458284bcce7d6a86328b7fd13483232a1a (patch)
treec3e41b9d2c902fe23aa30708f1530e9c0fbcdb5b /src/core.js
parentab407258795bfa05756b009058757f8b42aa9c53 (diff)
downloadjquery-154166458284bcce7d6a86328b7fd13483232a1a.tar.gz
jquery-154166458284bcce7d6a86328b7fd13483232a1a.zip
Core: add workaround for iOS JIT error in isArrayLike
Fixes gh-2145
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js
index 1cd3f53f7..4a8b73985 100644
--- a/src/core.js
+++ b/src/core.js
@@ -432,7 +432,12 @@ function(i, name) {
});
function isArraylike( obj ) {
- var length = obj.length,
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = "length" in obj && obj.length,
type = jQuery.type( obj );
if ( type === "function" || jQuery.isWindow( obj ) ) {