Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b84bcba

Browse files
fixup! fix(filter): Don't throw key.charAt is not a function when object's keys are not of type string.
1 parent 2bcc73f commit b84bcba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ng/filter/filter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
226226
var key;
227227
if (matchAgainstAnyProp) {
228228
for (key in actual) {
229+
// Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined
230+
// See: https://github.com/angular/angular.js/issues/15644
229231
if (key.charAt && (key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {
230232
return true;
231233
}

0 commit comments

Comments
 (0)