Skip to content

Commit 29aa21c

Browse files
committed
Need to call super() in derived class constructors
1 parent 4e272ba commit 29aa21c

File tree

8 files changed

+1880
-1898
lines changed

8 files changed

+1880
-1898
lines changed

build/build.js

Lines changed: 1872 additions & 1893 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"when": "^3.7.2"
4545
},
4646
"devDependencies": {
47-
"babelify": "^5.0.4",
47+
"babelify": "^6.0.2",
4848
"browser-sync": "^2.1.6",
4949
"browserify": "^8.0.3",
5050
"clean-css": "^3.1.9",

src/components/AuthenticatedApp.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import AuthService from '../services/AuthService'
77

88
export default class AuthenticatedApp extends React.Component {
99
constructor() {
10+
super()
1011
this.state = this._getLoginState();
1112
}
1213

src/components/AuthenticatedComponent.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default (ComposedComponent) => {
1111
}
1212

1313
constructor() {
14+
super()
1415
this.state = this._getLoginState();
1516
}
1617

src/components/Login.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Auth from '../services/AuthService'
55
export default class Login extends React.Component {
66

77
constructor() {
8+
super()
89
this.state = {
910
user: '',
1011
password: ''

src/components/Signup.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Auth from '../services/AuthService'
55
export default class Signup extends React.Component {
66

77
constructor() {
8+
super()
89
this.state = {
910
user: '',
1011
password: '',

src/stores/BaseStore.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import AppDispatcher from '../dispatchers/AppDispatcher';
44
export default class BaseStore extends EventEmitter {
55

66
constructor(actionSubscribe) {
7-
this._dispatchToken = AppDispatcher.register(actionSubscribe);
7+
super()
8+
this._dispatchToken = AppDispatcher.register(actionSubscribe());
89
}
910

1011
get dispatchToken() {

src/stores/LoginStore.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import jwt_decode from 'jwt-decode';
66
class LoginStore extends BaseStore {
77

88
constructor() {
9-
super(this._registerToActions.bind(this));
9+
super(() => this._registerToActions.bind(this));
1010
this._user = null;
1111
this._jwt = null;
1212
}
@@ -41,5 +41,3 @@ class LoginStore extends BaseStore {
4141
}
4242

4343
export default new LoginStore();
44-
45-

0 commit comments

Comments
 (0)