{"action":"closed","issue":{"url":"https://api.github.com/repos/wix/angular-tree-control/issues/194","repository_url":"https://api.github.com/repos/wix/angular-tree-control","labels_url":"https://api.github.com/repos/wix/angular-tree-control/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/wix/angular-tree-control/issues/194/comments","events_url":"https://api.github.com/repos/wix/angular-tree-control/issues/194/events","html_url":"https://github.com/wix/angular-tree-control/issues/194","id":138413231,"number":194,"title":"A bug in your method defaultEquality","user":{"login":"Ajrarn","id":5569420,"avatar_url":"https://avatars.githubusercontent.com/u/5569420?v=3","gravatar_id":"","url":"https://api.github.com/users/Ajrarn","html_url":"https://github.com/Ajrarn","followers_url":"https://api.github.com/users/Ajrarn/followers","following_url":"https://api.github.com/users/Ajrarn/following{/other_user}","gists_url":"https://api.github.com/users/Ajrarn/gists{/gist_id}","starred_url":"https://api.github.com/users/Ajrarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ajrarn/subscriptions","organizations_url":"https://api.github.com/users/Ajrarn/orgs","repos_url":"https://api.github.com/users/Ajrarn/repos","events_url":"https://api.github.com/users/Ajrarn/events{/privacy}","received_events_url":"https://api.github.com/users/Ajrarn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-04T08:22:01Z","updated_at":"2016-04-13T15:10:29Z","closed_at":"2016-04-13T15:10:29Z","body":"I have seen a bug in this method at line 76 of angular-tree-control.js.\r\n\r\nYou have written this : \r\n```javascript\r\nfunction defaultEquality(a, b) {\r\n                        if ( a === undefined || b === undefined)\r\n                            return false;\r\n                        a = shallowCopy(a);\r\n                        a[$scope.options.nodeChildren] = [];\r\n                        b = shallowCopy(b);\r\n                        b[$scope.options.nodeChildren] = [];\r\n                        return angular.equals(a, b);\r\n                    }\r\n```\r\nand I think it should be in the only test: \r\n```javascript\r\nif ( !a || !b )\r\n    return false;\r\n```\r\nI have seen this when one of these wasn't undefined but null."}}