stop constructor verification traversal on FunctionDeclaration/FunctionExpression - fixes #1155
This commit is contained in:
3
test/core/fixtures/transformation/misc/options.json
Normal file
3
test/core/fixtures/transformation/misc/options.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"externalHelpers": true
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
constructor (options) {
|
||||
let parentOptions = {};
|
||||
parentOptions.init = function () {
|
||||
this;
|
||||
};
|
||||
super(parentOptions);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var Foo = function Foo(options) {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
|
||||
var parentOptions = {};
|
||||
parentOptions.init = function () {
|
||||
this;
|
||||
};
|
||||
babelHelpers.get(Object.getPrototypeOf(Foo.prototype), "constructor", this).call(this, parentOptions);
|
||||
};
|
||||
Reference in New Issue
Block a user