clean up default constructor in derived classes - fixes #1748
This commit is contained in:
@@ -4,9 +4,7 @@ var BaseController = (function (_Chaplin$Controller) {
|
||||
function BaseController() {
|
||||
babelHelpers.classCallCheck(this, BaseController);
|
||||
|
||||
if (_Chaplin$Controller != null) {
|
||||
_Chaplin$Controller.apply(this, arguments);
|
||||
}
|
||||
_Chaplin$Controller.call.apply(_Chaplin$Controller, [this].concat(babelHelpers.slice.call(arguments)));
|
||||
}
|
||||
|
||||
babelHelpers.inherits(BaseController, _Chaplin$Controller);
|
||||
@@ -17,9 +15,7 @@ var BaseController2 = (function (_Chaplin$Controller$Another) {
|
||||
function BaseController2() {
|
||||
babelHelpers.classCallCheck(this, BaseController2);
|
||||
|
||||
if (_Chaplin$Controller$Another != null) {
|
||||
_Chaplin$Controller$Another.apply(this, arguments);
|
||||
}
|
||||
_Chaplin$Controller$Another.call.apply(_Chaplin$Controller$Another, [this].concat(babelHelpers.slice.call(arguments)));
|
||||
}
|
||||
|
||||
babelHelpers.inherits(BaseController2, _Chaplin$Controller$Another);
|
||||
|
||||
@@ -4,9 +4,7 @@ var Test = (function (_Foo) {
|
||||
function Test() {
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
|
||||
if (_Foo != null) {
|
||||
_Foo.apply(this, arguments);
|
||||
}
|
||||
_Foo.call.apply(_Foo, [this].concat(babelHelpers.slice.call(arguments)));
|
||||
}
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
var TestEmpty = (function (_ref) {
|
||||
function TestEmpty() {
|
||||
babelHelpers.classCallCheck(this, TestEmpty);
|
||||
|
||||
if (_ref != null) {
|
||||
_ref.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(TestEmpty.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(TestEmpty, _ref);
|
||||
@@ -22,10 +19,7 @@ var TestEmpty = (function (_ref) {
|
||||
var TestConstructorOnly = (function (_ref2) {
|
||||
function TestConstructorOnly() {
|
||||
babelHelpers.classCallCheck(this, TestConstructorOnly);
|
||||
|
||||
if (_ref2 != null) {
|
||||
_ref2.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(TestConstructorOnly.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(TestConstructorOnly, _ref2);
|
||||
@@ -41,10 +35,7 @@ var TestConstructorOnly = (function (_ref2) {
|
||||
var TestMethodOnly = (function (_ref3) {
|
||||
function TestMethodOnly() {
|
||||
babelHelpers.classCallCheck(this, TestMethodOnly);
|
||||
|
||||
if (_ref3 != null) {
|
||||
_ref3.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(TestMethodOnly.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(TestMethodOnly, _ref3);
|
||||
@@ -64,10 +55,7 @@ var TestMethodOnly = (function (_ref3) {
|
||||
var TestConstructorAndMethod = (function (_ref4) {
|
||||
function TestConstructorAndMethod() {
|
||||
babelHelpers.classCallCheck(this, TestConstructorAndMethod);
|
||||
|
||||
if (_ref4 != null) {
|
||||
_ref4.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(TestConstructorAndMethod.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(TestConstructorAndMethod, _ref4);
|
||||
@@ -87,10 +75,7 @@ var TestConstructorAndMethod = (function (_ref4) {
|
||||
var TestMultipleMethods = (function (_ref5) {
|
||||
function TestMultipleMethods() {
|
||||
babelHelpers.classCallCheck(this, TestMultipleMethods);
|
||||
|
||||
if (_ref5 != null) {
|
||||
_ref5.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(TestMultipleMethods.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(TestMultipleMethods, _ref5);
|
||||
@@ -108,4 +93,4 @@ var TestMultipleMethods = (function (_ref5) {
|
||||
value: function m2() {}
|
||||
}]);
|
||||
return _class5;
|
||||
})());
|
||||
})());
|
||||
@@ -3,10 +3,7 @@
|
||||
var BaseController = (function (_Chaplin$Controller) {
|
||||
function BaseController() {
|
||||
babelHelpers.classCallCheck(this, BaseController);
|
||||
|
||||
if (_Chaplin$Controller != null) {
|
||||
_Chaplin$Controller.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(BaseController.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(BaseController, _Chaplin$Controller);
|
||||
@@ -16,10 +13,7 @@ var BaseController = (function (_Chaplin$Controller) {
|
||||
var BaseController2 = (function (_Chaplin$Controller$Another) {
|
||||
function BaseController2() {
|
||||
babelHelpers.classCallCheck(this, BaseController2);
|
||||
|
||||
if (_Chaplin$Controller$Another != null) {
|
||||
_Chaplin$Controller$Another.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(BaseController2.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(BaseController2, _Chaplin$Controller$Another);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
var Test = (function (_Foo) {
|
||||
function Test() {
|
||||
babelHelpers.classCallCheck(this, Test);
|
||||
|
||||
if (_Foo != null) {
|
||||
_Foo.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(Test.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(Test, _Foo);
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
var Foo = (function (_Bar) {
|
||||
function Foo() {
|
||||
babelHelpers.classCallCheck(this, Foo);
|
||||
|
||||
if (_Bar != null) {
|
||||
_Bar.apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.get(Object.getPrototypeOf(Foo.prototype), "constructor", this).apply(this, arguments);
|
||||
this.bar = "foo";
|
||||
}
|
||||
|
||||
babelHelpers.inherits(Foo, _Bar);
|
||||
return Foo;
|
||||
})(Bar);
|
||||
})(Bar);
|
||||
@@ -11,10 +11,7 @@ var _ref = React.createElement(
|
||||
var App = (function (_React$Component) {
|
||||
function App() {
|
||||
babelHelpers.classCallCheck(this, App);
|
||||
|
||||
if (_React$Component != null) {
|
||||
_React$Component.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(App.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(App, _React$Component);
|
||||
@@ -39,4 +36,4 @@ var App = (function (_React$Component) {
|
||||
}
|
||||
}]);
|
||||
return App;
|
||||
})(React.Component);
|
||||
})(React.Component);
|
||||
@@ -9,10 +9,7 @@ var _store = require("./store");
|
||||
var Login = (function (_React$Component) {
|
||||
function Login() {
|
||||
babelHelpers.classCallCheck(this, Login);
|
||||
|
||||
if (_React$Component != null) {
|
||||
_React$Component.apply(this, arguments);
|
||||
}
|
||||
babelHelpers.get(Object.getPrototypeOf(Login.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
babelHelpers.inherits(Login, _React$Component);
|
||||
@@ -26,4 +23,4 @@ var Login = (function (_React$Component) {
|
||||
})(React.Component);
|
||||
|
||||
exports["default"] = Login;
|
||||
module.exports = exports["default"];
|
||||
module.exports = exports["default"];
|
||||
@@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
@@ -10,9 +12,7 @@ var Foo = (function (_Bar) {
|
||||
function Foo() {
|
||||
_classCallCheck(this, Foo);
|
||||
|
||||
if (_Bar != null) {
|
||||
_Bar.apply(this, arguments);
|
||||
}
|
||||
_get(Object.getPrototypeOf(Foo.prototype), "constructor", this).apply(this, arguments);
|
||||
}
|
||||
|
||||
_inherits(Foo, _Bar);
|
||||
|
||||
Reference in New Issue
Block a user