Core: add workaround for iOS JIT error in isArrayLike

Fixes gh-2145
This commit is contained in:
Timmy Willison
2015-04-04 15:34:07 -04:00
parent ab40725879
commit 1541664582
2 changed files with 27 additions and 1 deletions

View File

@@ -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 ) ) {