diff options
| author | Igor Minar | 2013-02-14 16:37:00 -0800 |
|---|---|---|
| committer | Igor Minar | 2013-02-14 16:37:00 -0800 |
| commit | 3c2aee01b0b299995eb92f4255159585b0f53c10 (patch) | |
| tree | caa9be59966e3c9207030b353bda266a413ea810 /src/ng | |
| parent | 37bdcc984a0240cf0ac125613acee12f1cee389d (diff) | |
| download | angular.js-3c2aee01b0b299995eb92f4255159585b0f53c10.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/ng')
| -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 c2a06686..8d02f763 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -106,7 +106,7 @@ */ function filterFilter() { return function(array, expression, comperator) { - 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){ |
