{"action":"closed","issue":{"url":"https://api.github.com/repos/Rich-Harris/buble/issues/18","repository_url":"https://api.github.com/repos/Rich-Harris/buble","labels_url":"https://api.github.com/repos/Rich-Harris/buble/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Rich-Harris/buble/issues/18/comments","events_url":"https://api.github.com/repos/Rich-Harris/buble/issues/18/events","html_url":"https://github.com/Rich-Harris/buble/issues/18","id":263354681,"number":18,"title":"[BUG] Classes are compiled to put `this` before `super()` calls.","user":{"login":"trusktr","id":297678,"avatar_url":"https://avatars3.githubusercontent.com/u/297678?v=4","gravatar_id":"","url":"https://api.github.com/users/trusktr","html_url":"https://github.com/trusktr","followers_url":"https://api.github.com/users/trusktr/followers","following_url":"https://api.github.com/users/trusktr/following{/other_user}","gists_url":"https://api.github.com/users/trusktr/gists{/gist_id}","starred_url":"https://api.github.com/users/trusktr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trusktr/subscriptions","organizations_url":"https://api.github.com/users/trusktr/orgs","repos_url":"https://api.github.com/users/trusktr/repos","events_url":"https://api.github.com/users/trusktr/events{/privacy}","received_events_url":"https://api.github.com/users/trusktr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-10-06T07:10:56Z","updated_at":"2018-02-05T15:08:17Z","closed_at":"2018-02-05T15:08:17Z","author_association":"CONTRIBUTOR","body":"I added my own support number based on `ie:10`, so it looks like this:\r\n\r\n```js\r\n\t\t    10: 0b1000000000000000000000000000010,\r\n```\r\n\r\nI wanted to leave classes alone, to compile those with Babel afterword.\r\n\r\nIt turns out, Buble is modifying the classes, and putting `this` before `super()` which turns into an error in Babel because `this` isn't allowed to be used before `super()`. The output look like this:\r\n\r\n```js\r\n        constructor (options) {\r\n            var this$1 = this;\r\n            if ( options === void 0 ) options = {};\r\n\r\n            super(options);\r\n\r\n            // use options\r\n        }\r\n```\r\n\r\nOddly, `this$1` is never used for anything. Not sure why Buble would put that there."}}
{"actor":{"display_login":"adrianheine"}}