{"action":"closed","issue":{"url":"https://api.github.com/repos/caohanyang/json_diff_rfc6902/issues/2","repository_url":"https://api.github.com/repos/caohanyang/json_diff_rfc6902","labels_url":"https://api.github.com/repos/caohanyang/json_diff_rfc6902/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/caohanyang/json_diff_rfc6902/issues/2/comments","events_url":"https://api.github.com/repos/caohanyang/json_diff_rfc6902/issues/2/events","html_url":"https://github.com/caohanyang/json_diff_rfc6902/issues/2","id":265774197,"number":2,"title":"crash when property is undefined","user":{"login":"Bonuspunkt","id":684817,"avatar_url":"https://avatars0.githubusercontent.com/u/684817?v=4","gravatar_id":"","url":"https://api.github.com/users/Bonuspunkt","html_url":"https://github.com/Bonuspunkt","followers_url":"https://api.github.com/users/Bonuspunkt/followers","following_url":"https://api.github.com/users/Bonuspunkt/following{/other_user}","gists_url":"https://api.github.com/users/Bonuspunkt/gists{/gist_id}","starred_url":"https://api.github.com/users/Bonuspunkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bonuspunkt/subscriptions","organizations_url":"https://api.github.com/users/Bonuspunkt/orgs","repos_url":"https://api.github.com/users/Bonuspunkt/repos","events_url":"https://api.github.com/users/Bonuspunkt/events{/privacy}","received_events_url":"https://api.github.com/users/Bonuspunkt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-16T13:41:03Z","updated_at":"2017-11-21T21:31:11Z","closed_at":"2017-11-21T21:31:11Z","author_association":"NONE","body":"``` js\r\nconst { diff } = require('json-diff-rfc6902');\r\n\r\nconst before = {\r\n    a: 'text',\r\n}\r\nconst after = {\r\n    a: 'text',\r\n    b: undefined\r\n};\r\n\r\ndiff(before, after);\r\n```\r\ncrashes with\r\n```\r\n.\\node_modules\\json-diff-rfc6902\\lib\\unchangedArea.js:71\r\n    if (newValue.toString() === value) {\r\n                ^\r\n\r\nTypeError: Cannot read property 'toString' of undefined\r\n    at Object.findValueInUnchanged (.\\node_modules\\json-diff-rfc6902\\lib\\unchangedArea.js:71:17)\r\n    at generateObjectDiff (.\\node_modules\\json-diff-rfc6902\\JSON-Diff.js:127:35)\r\n    at generateDiff (.\\node_modules\\json-diff-rfc6902\\JSON-Diff.js:51:5)\r\n    at diff (.\\node_modules\\json-diff-rfc6902\\JSON-Diff.js:33:3)\r\n```"}}
{"actor":{"display_login":"caohanyang"}}