@@ -194,9 +194,6 @@ module.exports = React.createClass({
194
194
componentWillMount : function ( ) {
195
195
SdkConfig . put ( this . props . config ) ;
196
196
197
- // if the automatic session load failed, the error
198
- this . sessionLoadError = null ;
199
-
200
197
if ( this . props . config . sync_timeline_limit ) {
201
198
MatrixClientPeg . opts . initialSyncLimit = this . props . config . sync_timeline_limit ;
202
199
}
@@ -285,7 +282,6 @@ module.exports = React.createClass({
285
282
} ) ;
286
283
} ) . catch ( ( e ) => {
287
284
console . error ( "Unable to load session" , e ) ;
288
- this . sessionLoadError = e . message ;
289
285
} ) . done ( ( ) => {
290
286
// stuff this through the dispatcher so that it happens
291
287
// after the on_logged_in action.
@@ -1232,7 +1228,7 @@ module.exports = React.createClass({
1232
1228
) ;
1233
1229
} else {
1234
1230
const Login = sdk . getComponent ( 'structures.login.Login' ) ;
1235
- var r = (
1231
+ return (
1236
1232
< Login
1237
1233
onLoggedIn = { Lifecycle . setLoggedIn }
1238
1234
onRegisterClick = { this . onRegisterClick }
@@ -1245,16 +1241,8 @@ module.exports = React.createClass({
1245
1241
onForgotPasswordClick = { this . onForgotPasswordClick }
1246
1242
enableGuest = { this . props . enableGuest }
1247
1243
onCancelClick = { this . state . guestCreds ? this . onReturnToGuestClick : null }
1248
- initialErrorText = { this . sessionLoadError }
1249
1244
/>
1250
1245
) ;
1251
-
1252
- // we only want to show the session load error the first time the
1253
- // Login component is rendered. This is pretty hacky but I can't
1254
- // think of another way to achieve it.
1255
- this . sessionLoadError = null ;
1256
-
1257
- return r ;
1258
1246
}
1259
1247
}
1260
1248
} ) ;
0 commit comments