Ensure constructors use the current super class.

This is an extension of 324a4a1b22.
This commit is contained in:
Brian Donovan
2015-01-08 09:31:18 -08:00
parent 8c478f29bc
commit af1912ab7a
5 changed files with 11 additions and 11 deletions

View File

@@ -18,8 +18,8 @@ var _inherits = function (child, parent) {
var BaseController = (function () {
var _Chaplin$Controller = Chaplin.Controller;
var BaseController = function BaseController() {
if (_Chaplin$Controller !== null) {
_Chaplin$Controller.apply(this, arguments);
if (Object.getPrototypeOf(BaseController) !== null) {
Object.getPrototypeOf(BaseController).apply(this, arguments);
}
};
@@ -31,8 +31,8 @@ var BaseController = (function () {
var BaseController2 = (function () {
var _Chaplin$Controller$Another = Chaplin.Controller.Another;
var BaseController2 = function BaseController2() {
if (_Chaplin$Controller$Another !== null) {
_Chaplin$Controller$Another.apply(this, arguments);
if (Object.getPrototypeOf(BaseController2) !== null) {
Object.getPrototypeOf(BaseController2).apply(this, arguments);
}
};

View File

@@ -18,8 +18,8 @@ var _inherits = function (child, parent) {
var Test = (function () {
var _Foo = Foo;
var Test = function Test() {
if (_Foo !== null) {
_Foo.apply(this, arguments);
if (Object.getPrototypeOf(Test) !== null) {
Object.getPrototypeOf(Test).apply(this, arguments);
}
};

View File

@@ -28,8 +28,8 @@ var _inherits = function (child, parent) {
var Foo = (function () {
var _Bar = Bar;
var Foo = function Foo() {
if (_Bar !== null) {
_Bar.apply(this, arguments);
if (Object.getPrototypeOf(Foo) !== null) {
Object.getPrototypeOf(Foo).apply(this, arguments);
}
};