We were using `Object.create` to setup the prototype chain at the start of the class definition, which lead to #7771. I was a bit worried about a speed hit, but it seems everyone optimizes the two patterns the same way. https://jsbench.github.io/#f9fca52407643d96458a35763b201215 Fixes #7771.
28 lines
839 B
JavaScript
28 lines
839 B
JavaScript
var BaseController =
|
|
/*#__PURE__*/
|
|
function (_Chaplin$Controller) {
|
|
"use strict";
|
|
|
|
function BaseController() {
|
|
babelHelpers.classCallCheck(this, BaseController);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController).apply(this, arguments));
|
|
}
|
|
|
|
babelHelpers.inherits(BaseController, _Chaplin$Controller);
|
|
return BaseController;
|
|
}(Chaplin.Controller);
|
|
|
|
var BaseController2 =
|
|
/*#__PURE__*/
|
|
function (_Chaplin$Controller$A) {
|
|
"use strict";
|
|
|
|
function BaseController2() {
|
|
babelHelpers.classCallCheck(this, BaseController2);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController2).apply(this, arguments));
|
|
}
|
|
|
|
babelHelpers.inherits(BaseController2, _Chaplin$Controller$A);
|
|
return BaseController2;
|
|
}(Chaplin.Controller.Another);
|