@@ -228,11 +228,11 @@ export var Router = React.createClass({
228
228
229
229
getInitialState ( ) {
230
230
return {
231
+ isTransitioning : false ,
231
232
location : null ,
232
233
branch : null ,
233
234
params : null ,
234
- components : null ,
235
- isTransitioning : false
235
+ components : null
236
236
} ;
237
237
} ,
238
238
@@ -245,8 +245,6 @@ export var Router = React.createClass({
245
245
this . setState ( { isTransitioning : true } ) ;
246
246
247
247
runTransition ( this . state , this . routes , location , this , ( error , transition , state ) => {
248
- this . setState ( { isTransitioning : false } ) ;
249
-
250
248
if ( error ) {
251
249
this . handleError ( error ) ;
252
250
} else if ( transition . isCancelled ) {
@@ -273,6 +271,8 @@ export var Router = React.createClass({
273
271
this . setState ( state , this . props . onUpdate ) ;
274
272
this . _alreadyUpdated = true ;
275
273
}
274
+
275
+ this . setState ( { isTransitioning : false } ) ;
276
276
} ) ;
277
277
} ,
278
278
@@ -294,7 +294,7 @@ export var Router = React.createClass({
294
294
if ( history ) {
295
295
invariant (
296
296
routes || children ,
297
- 'A client -side <Router> needs some routes. Try using <Router routes> or ' +
297
+ 'Client -side <Router>s need routes. Try using <Router routes> or ' +
298
298
'passing your routes as nested <Route> children'
299
299
) ;
300
300
@@ -313,7 +313,7 @@ export var Router = React.createClass({
313
313
314
314
invariant (
315
315
location && branch && params && components ,
316
- 'A server -side <Router> needs location, branch, params, and components ' +
316
+ 'Server -side <Router>s need location, branch, params, and components ' +
317
317
'props. Try using Router.match to get all the props you need'
318
318
) ;
319
319
0 commit comments