diff options
| author | Igor Minar | 2013-02-14 16:37:00 -0800 | 
|---|---|---|
| committer | Igor Minar | 2013-02-14 16:40:58 -0800 | 
| commit | 526a6b31e53a89c8941d976b476d54dac3908781 (patch) | |
| tree | 4021a0f9fff127b2c9e54d6b554523dd2a5c7fbf /src | |
| parent | 14fd064a62999a804bcce1050c81f603510fad95 (diff) | |
| download | angular.js-526a6b31e53a89c8941d976b476d54dac3908781.tar.bz2 | |
fix(*): don't use instanceof to detect arrays
this breaks when multiple javascript contexts are involved - like in node-webkit
see original PR: #1966
Closes #1966
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/filter/filter.js | 2 | ||||
| -rw-r--r-- | src/ng/filter/orderBy.js | 2 | 
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index 467f6699..525de42b 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -82,7 +82,7 @@   */  function filterFilter() {    return function(array, expression) { -    if (!(array instanceof Array)) return array; +    if (!isArray(array)) return array;      var predicates = [];      predicates.check = function(value) {        for (var j = 0; j < predicates.length; j++) { diff --git a/src/ng/filter/orderBy.js b/src/ng/filter/orderBy.js index 93f3f5a6..f9f9c09a 100644 --- a/src/ng/filter/orderBy.js +++ b/src/ng/filter/orderBy.js @@ -89,7 +89,7 @@  orderByFilter.$inject = ['$parse'];  function orderByFilter($parse){    return function(array, sortPredicate, reverseOrder) { -    if (!(array instanceof Array)) return array; +    if (!isArray(array)) return array;      if (!sortPredicate) return array;      sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];      sortPredicate = map(sortPredicate, function(predicate){  | 
