@@ -424,7 +424,7 @@ export function createHashHistory(
424
424
pathname = "/" ,
425
425
search = "" ,
426
426
hash = "" ,
427
- } = parsePath ( window . location . hash . substr ( 1 ) ) ;
427
+ } = parsePath ( window . location . hash . substring ( 1 ) ) ;
428
428
429
429
// Hash URL should always have a leading / just like window.location.pathname
430
430
// does, so if an app ends up at a route like /#something then we add a
@@ -510,7 +510,7 @@ export function warning(cond: any, message: string) {
510
510
}
511
511
512
512
function createKey ( ) {
513
- return Math . random ( ) . toString ( 36 ) . substr ( 2 , 8 ) ;
513
+ return Math . random ( ) . toString ( 36 ) . substring ( 2 , 10 ) ;
514
514
}
515
515
516
516
/**
@@ -576,14 +576,14 @@ export function parsePath(path: string): Partial<Path> {
576
576
if ( path ) {
577
577
let hashIndex = path . indexOf ( "#" ) ;
578
578
if ( hashIndex >= 0 ) {
579
- parsedPath . hash = path . substr ( hashIndex ) ;
580
- path = path . substr ( 0 , hashIndex ) ;
579
+ parsedPath . hash = path . substring ( hashIndex ) ;
580
+ path = path . substring ( 0 , hashIndex ) ;
581
581
}
582
582
583
583
let searchIndex = path . indexOf ( "?" ) ;
584
584
if ( searchIndex >= 0 ) {
585
- parsedPath . search = path . substr ( searchIndex ) ;
586
- path = path . substr ( 0 , searchIndex ) ;
585
+ parsedPath . search = path . substring ( searchIndex ) ;
586
+ path = path . substring ( 0 , searchIndex ) ;
587
587
}
588
588
589
589
if ( path ) {
0 commit comments