mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 01:10:23 +00:00
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
This commit is contained in:
parent
37bdcc984a
commit
3c2aee01b0
2 changed files with 2 additions and 2 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in a new issue