{"action":"closed","issue":{"url":"https://api.github.com/repos/LearnBoost/mongoose/issues/1892","labels_url":"https://api.github.com/repos/LearnBoost/mongoose/issues/1892/labels{/name}","comments_url":"https://api.github.com/repos/LearnBoost/mongoose/issues/1892/comments","events_url":"https://api.github.com/repos/LearnBoost/mongoose/issues/1892/events","html_url":"https://github.com/LearnBoost/mongoose/issues/1892","id":26150296,"number":1892,"title":"Setter is not called when value is undefined","user":{"login":"lazutkin","id":1035026,"avatar_url":"https://avatars.githubusercontent.com/u/1035026?v=3","gravatar_id":"","url":"https://api.github.com/users/lazutkin","html_url":"https://github.com/lazutkin","followers_url":"https://api.github.com/users/lazutkin/followers","following_url":"https://api.github.com/users/lazutkin/following{/other_user}","gists_url":"https://api.github.com/users/lazutkin/gists{/gist_id}","starred_url":"https://api.github.com/users/lazutkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazutkin/subscriptions","organizations_url":"https://api.github.com/users/lazutkin/orgs","repos_url":"https://api.github.com/users/lazutkin/repos","events_url":"https://api.github.com/users/lazutkin/events{/privacy}","received_events_url":"https://api.github.com/users/lazutkin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/LearnBoost/mongoose/milestones/25","labels_url":"https://api.github.com/repos/LearnBoost/mongoose/milestones/25/labels","id":963705,"number":25,"title":"4.0.0-rc2","description":"","creator":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2015-02-03T15:34:11Z","updated_at":"2015-02-05T16:55:17Z","due_on":"2015-02-09T05:00:00Z","closed_at":null},"comments":2,"created_at":"2014-01-23T08:07:47Z","updated_at":"2015-02-05T16:55:17Z","closed_at":"2015-02-05T16:55:17Z","body":"Setters are not fired with `undefined` value assigned to path.\r\n\r\n```coffee\r\nmongoose = require \"mongoose\"\r\nSchema = mongoose.Schema\r\n\r\nPerson = new Schema\r\n  name: String\r\n\r\nPerson.path( \"name\" ).set ( x ) ->\r\n  console.log \"called with value <#{x}> of type #{typeof x}\"\r\n  x\r\n\r\nPerson = mongoose.model \"Person\", Person\r\n\r\n\r\np = new Person( )\r\np.name = \"John\"\r\np.name = undefined\r\n```\r\n\r\nOutput is:\r\n\r\n```\r\ncalled with value <John> of type string\r\n```"}}