add if super check to constructor default
This commit is contained in:
@@ -13,13 +13,17 @@ var _extends = function (child, parent) {
|
||||
};
|
||||
|
||||
var BaseController = function BaseController() {
|
||||
Chaplin.Controller.apply(this, arguments);
|
||||
if (Chaplin.Controller) {
|
||||
Chaplin.Controller.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
_extends(BaseController, Chaplin.Controller);
|
||||
|
||||
var BaseController2 = function BaseController2() {
|
||||
Chaplin.Controller.Another.apply(this, arguments);
|
||||
if (Chaplin.Controller.Another) {
|
||||
Chaplin.Controller.Another.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
_extends(BaseController2, Chaplin.Controller.Another);
|
||||
|
||||
@@ -15,7 +15,9 @@ var _extends = function (child, parent) {
|
||||
var _QSuper = function () {};
|
||||
|
||||
var Q = function Q() {
|
||||
_QSuper.apply(this, arguments);
|
||||
if (_QSuper) {
|
||||
_QSuper.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
_extends(Q, _QSuper);
|
||||
|
||||
@@ -13,7 +13,9 @@ var _extends = function (child, parent) {
|
||||
};
|
||||
|
||||
var Test = function Test() {
|
||||
Foo.apply(this, arguments);
|
||||
if (Foo) {
|
||||
Foo.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
|
||||
Reference in New Issue
Block a user