Justin Ridgewell f8ab9466d3
Move subclass inheritance to end (#7772)
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.
2018-04-21 17:31:44 -04:00

26 lines
615 B
JavaScript

var BaseController =
/*#__PURE__*/
function (_Chaplin$Controller) {
"use strict";
function BaseController() {
return _Chaplin$Controller.apply(this, arguments) || this;
}
babelHelpers.inheritsLoose(BaseController, _Chaplin$Controller);
return BaseController;
}(Chaplin.Controller);
var BaseController2 =
/*#__PURE__*/
function (_Chaplin$Controller$A) {
"use strict";
function BaseController2() {
return _Chaplin$Controller$A.apply(this, arguments) || this;
}
babelHelpers.inheritsLoose(BaseController2, _Chaplin$Controller$A);
return BaseController2;
}(Chaplin.Controller.Another);