File tree Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Expand file tree Collapse file tree 3 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ function createRouter(options) {
172
172
makePath : function ( to , params , query ) {
173
173
var path ;
174
174
if ( Path . isAbsolute ( to ) ) {
175
- path = Path . normalize ( to ) ;
175
+ path = to ;
176
176
} else {
177
177
var route = ( to instanceof Route ) ? to : Route . findRouteByName ( this . routes , to ) ;
178
178
Original file line number Diff line number Diff line change @@ -145,13 +145,6 @@ var Path = {
145
145
return path . charAt ( 0 ) === '/' ;
146
146
} ,
147
147
148
- /**
149
- * Returns a normalized version of the given path.
150
- */
151
- normalize : function ( path , parentRoute ) {
152
- return path . replace ( / ^ \/ * / , '/' ) ;
153
- } ,
154
-
155
148
/**
156
149
* Joins two URL paths together.
157
150
*/
Original file line number Diff line number Diff line change @@ -319,23 +319,3 @@ describe('Path.withQuery', function () {
319
319
expect ( Path . withQuery ( '/path?a=b' , { c : [ 'd' , 'e' ] } ) ) . toEqual ( '/path?a=b&c=d&c=e' ) ;
320
320
} ) ;
321
321
} ) ;
322
-
323
- describe ( 'Path.normalize' , function ( ) {
324
- describe ( 'on a path with no slashes at the beginning' , function ( ) {
325
- it ( 'adds a slash' , function ( ) {
326
- expect ( Path . normalize ( 'a/b/c' ) ) . toEqual ( '/a/b/c' ) ;
327
- } ) ;
328
- } ) ;
329
-
330
- describe ( 'on a path with a single slash at the beginning' , function ( ) {
331
- it ( 'preserves the slash' , function ( ) {
332
- expect ( Path . normalize ( '/a/b/c' ) ) . toEqual ( '/a/b/c' ) ;
333
- } ) ;
334
- } ) ;
335
-
336
- describe ( 'on a path with many slashes at the beginning' , function ( ) {
337
- it ( 'reduces them to a single slash' , function ( ) {
338
- expect ( Path . normalize ( '//a/b/c' ) ) . toEqual ( '/a/b/c' ) ;
339
- } ) ;
340
- } ) ;
341
- } ) ;
You can’t perform that action at this time.
0 commit comments