-
Notifications
You must be signed in to change notification settings - Fork 27.4k
angular.equals issue with objects containing custom toString methods. #10425
Comments
Yep --- this affects any function property where the same property name is a function in both objectA and objectB, regardless of where in the prototype chain it is. http://plnkr.co/edit/YO9qE7A858Dm4Ect7jwN?p=preview --- obviously O.p methods are going to be the more common problems, though. |
There's a test case in the tree, it('should ignore functions', function() {
expect(equals({func: function() {}}, {bar: function() {}})).toEqual(true);
}); so presumably this is the desired behaviour ._. How much of a problem is this? |
The Closing since this is the expected behaviour and documented in the API docs: https://docs.angularjs.org/api/ng/function/angular.equals
|
OK, so let's put this in the ice box and return to it if we get a real life use case that is breaking someone's app. |
I think this is due to the isFunction check in.
The text was updated successfully, but these errors were encountered: