diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Angular.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index 88ea452b..386682a3 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -213,7 +213,9 @@ function forEach(obj, iterator, context) { if (obj) { if (isFunction(obj)){ for (key in obj) { - if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) { + // Need to check if hasOwnProperty exists, + // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function + if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) { iterator.call(context, obj[key], key); } } |
