diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index a0b49948d55c..acecd9244c2e 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -226,7 +226,9 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA var key; if (matchAgainstAnyProp) { for (key in actual) { - if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) { + // Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined + // See: https://github.com/angular/angular.js/issues/15644 + if (key.charAt && (key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) { return true; } }