@@ -950,14 +950,6 @@ var invariant = _dereq_('react/lib/invariant');
950950var merge = _dereq_ ( 'qs/lib/utils' ) . merge ;
951951var qs = _dereq_ ( 'qs' ) ;
952952
953- function decodePathSegment ( string ) {
954- return decodeURIComponent ( string . replace ( / \+ / g, ' ' ) ) ;
955- }
956-
957- function encodePathSegment ( string ) {
958- return encodeURIComponent ( string ) . replace ( / % 2 0 / g, '+' ) ;
959- }
960-
961953var paramCompileMatcher = / : ( [ a - z A - Z _ $ ] [ a - z A - Z 0 - 9 _ $ ] * ) | [ * . ( ) \[ \] \\ + | { } ^ $ ] / g;
962954var paramInjectMatcher = / : ( [ a - z A - Z _ $ ] [ a - z A - Z 0 - 9 _ $ ? ] * [ ? ] ? ) | [ * ] / g;
963955var paramInjectTrailingSlashMatcher = / \/ \/ \? | \/ \? / g;
@@ -994,15 +986,15 @@ var Path = {
994986 /**
995987 * Safely decodes special characters in the given URL path.
996988 */
997- decode : function decodePath ( path ) {
998- return String ( path ) . split ( '/' ) . map ( decodePathSegment ) . join ( '/' ) ;
989+ decode : function ( path ) {
990+ return decodeURI ( path . replace ( / \+ / g , ' ' ) ) ;
999991 } ,
1000992
1001993 /**
1002994 * Safely encodes special characters in the given URL path.
1003995 */
1004- encode : function encodePath ( path ) {
1005- return String ( path ) . split ( '/' ) . map ( encodePathSegment ) . join ( '/ ') ;
996+ encode : function ( path ) {
997+ return encodeURI ( path ) . replace ( / % 2 0 / g , '+ ') ;
1006998 } ,
1007999
10081000 /**
@@ -1302,6 +1294,7 @@ var ImitateBrowserBehavior = _dereq_('../behaviors/ImitateBrowserBehavior');
13021294var RouteHandler = _dereq_ ( '../components/RouteHandler' ) ;
13031295var HashLocation = _dereq_ ( '../locations/HashLocation' ) ;
13041296var HistoryLocation = _dereq_ ( '../locations/HistoryLocation' ) ;
1297+ var RefreshLocation = _dereq_ ( '../locations/RefreshLocation' ) ;
13051298var NavigationContext = _dereq_ ( '../mixins/NavigationContext' ) ;
13061299var StateContext = _dereq_ ( '../mixins/StateContext' ) ;
13071300var Scrolling = _dereq_ ( '../mixins/Scrolling' ) ;
@@ -1723,7 +1716,7 @@ function createRouter(options) {
17231716
17241717module . exports = createRouter ;
17251718
1726- } , { "../behaviors/ImitateBrowserBehavior" :2 , "../components/RouteHandler" :8 , "../locations/HashLocation" :10 , "../locations/HistoryLocation" :11 , "../mixins/NavigationContext" :15 , "../mixins/Scrolling" :16 , "../mixins/StateContext" :18 , "./Path" :19 , "./PropTypes" :21 , "./Redirect" :22 , "./Transition" :23 , "./createRoutesFromChildren" :25 , "./supportsHistory" :29 , "react/lib/ExecutionEnvironment" :35 , "react/lib/invariant" :39 , "react/lib/warning" :40 } ] , 25 :[ function ( _dereq_ , module , exports ) {
1719+ } , { "../behaviors/ImitateBrowserBehavior" :2 , "../components/RouteHandler" :8 , "../locations/HashLocation" :10 , "../locations/HistoryLocation" :11 , "../locations/RefreshLocation" : 12 , "../ mixins/NavigationContext" :15 , "../mixins/Scrolling" :16 , "../mixins/StateContext" :18 , "./Path" :19 , "./PropTypes" :21 , "./Redirect" :22 , "./Transition" :23 , "./createRoutesFromChildren" :25 , "./supportsHistory" :29 , "react/lib/ExecutionEnvironment" :35 , "react/lib/invariant" :39 , "react/lib/warning" :40 } ] , 25 :[ function ( _dereq_ , module , exports ) {
17271720var React = ( typeof window !== "undefined" ? window . React : typeof global !== "undefined" ? global . React : null ) ;
17281721var warning = _dereq_ ( 'react/lib/warning' ) ;
17291722var invariant = _dereq_ ( 'react/lib/invariant' ) ;
@@ -1783,7 +1776,7 @@ function createRoute(element, parentRoute, namedRoutes) {
17831776
17841777 if ( type === Redirect . type ) {
17851778 route . handler = createRedirectHandler ( props . to , props . params , props . query ) ;
1786- props . path = props . path || props . from ;
1779+ props . path = props . path || props . from || '*' ;
17871780 } else {
17881781 route . handler = props . handler ;
17891782 }
0 commit comments