{"action":"created","issue":{"url":"https://api.github.com/repos/6to5/6to5/issues/652","labels_url":"https://api.github.com/repos/6to5/6to5/issues/652/labels{/name}","comments_url":"https://api.github.com/repos/6to5/6to5/issues/652/comments","events_url":"https://api.github.com/repos/6to5/6to5/issues/652/events","html_url":"https://github.com/6to5/6to5/issues/652","id":56155401,"number":652,"title":"Destructuring argument with default does not work in generators","user":{"login":"monsanto","id":247721,"avatar_url":"https://avatars.githubusercontent.com/u/247721?v=3","gravatar_id":"","url":"https://api.github.com/users/monsanto","html_url":"https://github.com/monsanto","followers_url":"https://api.github.com/users/monsanto/followers","following_url":"https://api.github.com/users/monsanto/following{/other_user}","gists_url":"https://api.github.com/users/monsanto/gists{/gist_id}","starred_url":"https://api.github.com/users/monsanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monsanto/subscriptions","organizations_url":"https://api.github.com/users/monsanto/orgs","repos_url":"https://api.github.com/users/monsanto/repos","events_url":"https://api.github.com/users/monsanto/events{/privacy}","received_events_url":"https://api.github.com/users/monsanto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-01T07:23:29Z","updated_at":"2015-02-01T07:25:23Z","closed_at":"2015-02-01T07:25:23Z","body":"```\r\nfunction *foo({bar=0}) {\r\n    console.log(bar)\r\n}\r\n\r\n// should print 3, instead prints 0\r\nfoo({bar: 3}).next()\r\n```"},"comment":{"url":"https://api.github.com/repos/6to5/6to5/issues/comments/72354933","html_url":"https://github.com/6to5/6to5/issues/652#issuecomment-72354933","issue_url":"https://api.github.com/repos/6to5/6to5/issues/652","id":72354933,"user":{"login":"sebmck","id":853712,"avatar_url":"https://avatars.githubusercontent.com/u/853712?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmck","html_url":"https://github.com/sebmck","followers_url":"https://api.github.com/users/sebmck/followers","following_url":"https://api.github.com/users/sebmck/following{/other_user}","gists_url":"https://api.github.com/users/sebmck/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmck/subscriptions","organizations_url":"https://api.github.com/users/sebmck/orgs","repos_url":"https://api.github.com/users/sebmck/repos","events_url":"https://api.github.com/users/sebmck/events{/privacy}","received_events_url":"https://api.github.com/users/sebmck/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T07:25:23Z","updated_at":"2015-02-01T07:25:23Z","body":"Nope, this is expected behaviour. Just because you have a destructuring parameter doesn't mean that it automatically defaults to an object.\r\n\r\n```javascript\r\nfunction *foo({ bar = 0 } = {}) {\r\n    console.log(bar)\r\n}\r\n```"}}