-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
7.x: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Babel version: 7.0.0-alpha.19
This bug only happens when using these two plugins together.
Input Code
const fn = () => {
return class {
fn = () => console.log(this);
};
};Babel Configuration (.babelrc, package.json, cli command)
--plugins transform-class-properties,transform-es2015-arrow-functionsExpected Behavior
const fn = function () {
return class {
constructor() {
var _this = this; // <--
this.fn = function () {
return console.log(_this);
};
}
};
};Current Behavior
var _this = this; // <--
const fn = function () {
return class {
constructor() {
this.fn = function () {
return console.log(_this);
};
}
};
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
7.x: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue