Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 647f3f5

Browse files
snapwichpetebacondarwin
authored andcommitted
fix(jqLite): check for "length" in obj in isArrayLike to prevent iOS8 JIT bug from surfacing
Closes #11508
1 parent c8de0e4 commit 647f3f5

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
@@ -197,7 +197,9 @@ function isArrayLike(obj) {
197197
return false;
198198
}
199199

200-
var length = obj.length;
200+
// Support: iOS 8.2 (not reproducible in simulator)
201+
// "length" in obj used to prevent JIT error (gh-11508)
202+
var length = "length" in Object(obj) && obj.length;
201203

202204
if (obj.nodeType === NODE_TYPE_ELEMENT && length) {
203205
return true;

0 commit comments

Comments
 (0)