Fix returning an object in a derived class constructor without super (#5885)
This commit is contained in:
committed by
Henry Zhu
parent
960e1708a1
commit
e170e6d760
@@ -7,10 +7,10 @@ var Foo = function (_Bar) {
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
|
||||
function Foo() {
|
||||
var _this;
|
||||
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
|
||||
var _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
|
||||
|
||||
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
|
||||
_this.state = "test";
|
||||
return _this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user