-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
Solve case : angular#10991 with using filter and deep object
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
Just signed a Contributor License Agreement (CLA) |
CLAs look good, thanks! |
Nice catch, but I don't think the fix is right. The problem is that So, the right fix would involve differentiating "real" objects from I would probably change: var actualType = typeof actual; with: var actualType = (actual !== null) ? typeof actual : 'null'; // anything other than "object" or "function" |
@ElephantRose: BTW, it would also be great to have a couple of tests should in order to ensure that this is not accidentally broken in the future. |
Hi, Thanks for your reply. Here is a jsfiddle demo : http://jsfiddle.net/ykm0d6f0/13/ The 1rst case, is without fix just for reference Sadly I do not have other tests, so i can't guarantee what i proposed work for every cases. |
@ElephantRose: Unfortunately, this is a different issue (not related to this one).
This is why I said that your original fix changes the semantics of So, to recap, there are 2 different issues discussed here:
Regarding (2) (off the top of my head), it might be possible to prefix/suffix a property name with |
So, here is what I propose:
|
I understand the 2nd point is not really an issue... more a side effect. I'll definitely look after custom comparator before opening a feature request. Thanks for your help |
@ElephantRose, so since this PR is not the right fix, would you be interested in submitting a new PR to fix the |
@gkalpak, I'll be glad to do a new one And I didn't reply about my 2nd point, but i managed to do it with custom comparator as you suggested. |
Regarding the issue angular#10991 and the following discussion angular#10992 Solve issue with null property value when using objects with filter.
… when using objects with filter fix(filterFilter): solve issue angular#10991 with null property value when using objects with filter Regarding the issue angular#10991 and the following discussion angular#10992
…paring objects Closes angular#10991 Closes angular#10992 Closes angular#11116
Solve case : #10991
with using filter and deep object