fix no RHS in class properties causing undefined to be used instead of a noop - fixes #1396
This commit is contained in:
@@ -2,5 +2,4 @@
|
||||
|
||||
var Foo = function Foo() {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
this.bar = undefined;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ class Foo {
|
||||
static num;
|
||||
}
|
||||
|
||||
assert.equal("num" in Foo, true);
|
||||
assert.equal("num" in Foo, false);
|
||||
assert.equal(Foo.num, undefined);
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
}
|
||||
|
||||
babelHelpers.createClass(Foo, null, [{
|
||||
key: "bar",
|
||||
value: undefined,
|
||||
enumerable: true
|
||||
}]);
|
||||
return Foo;
|
||||
})();
|
||||
var Foo = function Foo() {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ var Foo = (function () {
|
||||
babelHelpers.createDecoratedClass(Foo, [{
|
||||
key: "foo",
|
||||
decorators: [bar],
|
||||
initializer: function () {},
|
||||
initializer: null,
|
||||
enumerable: true
|
||||
}], null, _instanceInitializers);
|
||||
return Foo;
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -10,7 +10,7 @@ var Foo = (function () {
|
||||
babelHelpers.createDecoratedClass(Foo, null, [{
|
||||
key: "foo",
|
||||
decorators: [bar],
|
||||
initializer: function () {},
|
||||
initializer: null,
|
||||
enumerable: true
|
||||
}], null, _staticInitializers);
|
||||
babelHelpers.defineDecoratedPropertyDescriptor(Foo, "foo", _staticInitializers);
|
||||
|
||||
Reference in New Issue
Block a user