File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ const router: Router<MyRoute> = new Router(
9797
9898expectRoute ( '/' , home ( ) ) ;
9999expectRoute ( '/songs' , songs ( nothing ) ) ;
100+ expectRoute ( '/songs/' , songs ( nothing ) ) ;
100101expectRoute ( '/song/123' , song ( 123 ) ) ;
101102expectRoute ( '/song/123/edit' , song ( 123 , true ) ) ;
102103expectRoute ( '/songs?q=foobar' , songs ( just ( 'foobar' ) ) ) ;
Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ export class RouteDef<R> implements RouteBase<R> {
331331
332332 static sanitizePath ( path : string ) : string {
333333 const p1 = path . startsWith ( '/' ) ? path . substring ( 1 ) : path ;
334- return p1 . endsWith ( '/' ) ? p1 . substring ( 0 , p1 . length - 2 ) : p1 ;
334+ return p1 . endsWith ( '/' ) ? p1 . substring ( 0 , p1 . length - 1 ) : p1 ;
335335 }
336336
337337 static splitPath ( path : string ) : ReadonlyArray < string > {
You can’t perform that action at this time.
0 commit comments