Skip to content

Commit 072f990

Browse files
committed
Tweak warning messages
1 parent 1790854 commit 072f990

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/Router.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ export var Router = React.createClass({
228228

229229
getInitialState() {
230230
return {
231+
isTransitioning: false,
231232
location: null,
232233
branch: null,
233234
params: null,
234-
components: null,
235-
isTransitioning: false
235+
components: null
236236
};
237237
},
238238

@@ -245,8 +245,6 @@ export var Router = React.createClass({
245245
this.setState({ isTransitioning: true });
246246

247247
runTransition(this.state, this.routes, location, this, (error, transition, state) => {
248-
this.setState({ isTransitioning: false });
249-
250248
if (error) {
251249
this.handleError(error);
252250
} else if (transition.isCancelled) {
@@ -273,6 +271,8 @@ export var Router = React.createClass({
273271
this.setState(state, this.props.onUpdate);
274272
this._alreadyUpdated = true;
275273
}
274+
275+
this.setState({ isTransitioning: false });
276276
});
277277
},
278278

@@ -294,7 +294,7 @@ export var Router = React.createClass({
294294
if (history) {
295295
invariant(
296296
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 ' +
298298
'passing your routes as nested <Route> children'
299299
);
300300

@@ -313,7 +313,7 @@ export var Router = React.createClass({
313313

314314
invariant(
315315
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 ' +
317317
'props. Try using Router.match to get all the props you need'
318318
);
319319

0 commit comments

Comments
 (0)