Skip to content

Commit 7555867

Browse files
snapwichnetman92
authored andcommitted
fix(jqLite): check for "length" in obj in isArrayLike to prevent iOS8 JIT bug from surfacing
Closes angular#11508
1 parent 4b12b75 commit 7555867

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Angular.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ function isArrayLike(obj) {
200200
return false;
201201
}
202202

203-
var length = obj.length;
203+
// Support: iOS 8.2 (not reproducible in simulator)
204+
// "length" in obj used to prevent JIT error (gh-11508)
205+
var length = "length" in Object(obj) && obj.length;
204206

205207
if (obj.nodeType === NODE_TYPE_ELEMENT && length) {
206208
return true;

0 commit comments

Comments
 (0)