We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 352529f + f580242 commit 192585aCopy full SHA for 192585a
underscore.js
@@ -125,9 +125,10 @@
125
// Helper for collection methods to determine whether a collection
126
// should be iterated as an array or as an object
127
// Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
128
- var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
129
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1, LENGTH = 'length';
130
var isArrayLike = function(collection) {
- var length = collection != null && collection.length;
131
+ var length = collection != null && collection[LENGTH];
132
return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
133
};
134
0 commit comments