File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ var Path = {
8484
8585 var splatIndex = 0 ;
8686
87- var url = pattern . replace ( paramInjectMatcher , function ( match , paramName ) {
87+ return pattern . replace ( paramInjectMatcher , function ( match , paramName ) {
8888 paramName = paramName || 'splat' ;
8989
9090 // If param is optional don't check for existence
@@ -113,12 +113,7 @@ var Path = {
113113 }
114114
115115 return encodeURLPath ( segment ) ;
116- } ) ;
117- url = url . replace ( paramInjectTrailingSlashMatcher , '/' ) ;
118-
119- console . log ( url ) ;
120-
121- return url ;
116+ } ) . replace ( paramInjectTrailingSlashMatcher , '/' ) ;
122117 } ,
123118
124119 /**
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ describe('Path.extractParams', function () {
6262 } ) ;
6363 } ) ;
6464 describe ( 'and the pattern and forward slash are optional' , function ( ) {
65- var pattern = 'comments/:id?/edit'
65+ var pattern = 'comments/:id?/? edit'
6666
6767 describe ( 'and the path matches with supplied param' , function ( ) {
6868 it ( 'returns an object with the params' , function ( ) {
You can’t perform that action at this time.
0 commit comments