From 9ac39117356f0847f769731e6e7d6f05efac0ed5 Mon Sep 17 00:00:00 2001 From: Rich Snapp Date: Tue, 7 Apr 2015 13:46:55 -0600 Subject: [PATCH] fix(jqLite): check for "length" in obj in isArrayLike to prevent iOS8 JIT bug from surfacing --- src/Angular.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Angular.js b/src/Angular.js index eaccab1fbc32..a35e2fa4ca23 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -200,7 +200,9 @@ function isArrayLike(obj) { return false; } - var length = obj.length; + // Support: iOS 8.2 (not reproducible in simulator) + // "length" in obj used to prevent JIT error (gh-11508) + var length = "length" in Object(obj) && obj.length; if (obj.nodeType === NODE_TYPE_ELEMENT && length) { return true;