@@ -424,7 +424,7 @@ export function createHashHistory(
424424 pathname = "/" ,
425425 search = "" ,
426426 hash = "" ,
427- } = parsePath ( window . location . hash . substr ( 1 ) ) ;
427+ } = parsePath ( window . location . hash . substring ( 1 ) ) ;
428428
429429 // Hash URL should always have a leading / just like window.location.pathname
430430 // 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) {
510510}
511511
512512function createKey ( ) {
513- return Math . random ( ) . toString ( 36 ) . substr ( 2 , 8 ) ;
513+ return Math . random ( ) . toString ( 36 ) . substring ( 2 , 10 ) ;
514514}
515515
516516/**
@@ -576,14 +576,14 @@ export function parsePath(path: string): Partial<Path> {
576576 if ( path ) {
577577 let hashIndex = path . indexOf ( "#" ) ;
578578 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 ) ;
581581 }
582582
583583 let searchIndex = path . indexOf ( "?" ) ;
584584 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 ) ;
587587 }
588588
589589 if ( path ) {
0 commit comments