11var React = require ( 'react' ) ;
22var warning = require ( 'react/lib/warning' ) ;
3- var invariant = require ( 'react/lib/invariant' ) ;
43var ExecutionEnvironment = require ( 'react/lib/ExecutionEnvironment' ) ;
54var mergeProperties = require ( '../helpers/mergeProperties' ) ;
65var goBack = require ( '../helpers/goBack' ) ;
@@ -34,7 +33,7 @@ var REF_NAME = '__activeRoute__';
3433/**
3534 * <Route> components specify components that are rendered to the page when the
3635 * URL matches a given pattern.
37- *
36+ *
3837 * Routes are arranged in a nested tree structure. When a new URL is requested,
3938 * the tree is searched depth-first to find a route whose path matches the URL.
4039 * When one is found, all routes in the tree that lead to it are considered
@@ -117,7 +116,7 @@ var Route = React.createClass({
117116 location : React . PropTypes . oneOf ( [ 'hash' , 'history' ] ) . isRequired ,
118117 handler : React . PropTypes . any . isRequired ,
119118 path : React . PropTypes . string ,
120- name : React . PropTypes . string ,
119+ name : React . PropTypes . string
121120 } ,
122121
123122 getDefaultProps : function ( ) {
@@ -265,6 +264,7 @@ function Redirect(to, params, query) {
265264
266265function findMatches ( path , route ) {
267266 var children = route . props . children , matches ;
267+ var params ;
268268
269269 // Check the subtree first to find the most deeply-nested match.
270270 if ( Array . isArray ( children ) ) {
@@ -277,7 +277,7 @@ function findMatches(path, route) {
277277
278278 if ( matches ) {
279279 var rootParams = getRootMatch ( matches ) . params ;
280- var params = { } ;
280+ params = { } ;
281281
282282 Path . extractParamNames ( route . props . path ) . forEach ( function ( paramName ) {
283283 params [ paramName ] = rootParams [ paramName ] ;
@@ -289,7 +289,7 @@ function findMatches(path, route) {
289289 }
290290
291291 // No routes in the subtree matched, so check this route.
292- var params = Path . extractParams ( route . props . path , path ) ;
292+ params = Path . extractParams ( route . props . path , path ) ;
293293
294294 if ( params )
295295 return [ makeMatch ( route , params ) ] ;
@@ -422,7 +422,7 @@ function checkTransitionFromHooks(matches, transition) {
422422function checkTransitionToHooks ( matches , transition ) {
423423 var promise = Promise . resolve ( ) ;
424424
425- matches . forEach ( function ( match , index ) {
425+ matches . forEach ( function ( match ) {
426426 promise = promise . then ( function ( ) {
427427 var handler = match . route . props . handler ;
428428
0 commit comments