From 3c3e8c9de69dc8d684db616555368d732a310911 Mon Sep 17 00:00:00 2001 From: Ivo Georgiev Date: Wed, 6 Feb 2013 22:16:39 +0000 Subject: [PATCH 1/2] Use isArray instead of instanceof --- src/ng/filter/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index 467f6699f394..2ce5d1a3a0e5 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++) { From 85b880e03db7e6987ea8ead619815ea863b1865f Mon Sep 17 00:00:00 2001 From: Ivo Georgiev Date: Wed, 6 Feb 2013 22:17:33 +0000 Subject: [PATCH 2/2] Use isArray instead of instanceof --- src/ng/filter/orderBy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/filter/orderBy.js b/src/ng/filter/orderBy.js index 93f3f5a6977d..93a8fca55c18 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){