File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -595,8 +595,13 @@ export function createHashHistory(
595595 return parsePath ( pathname . replace ( hashRoot , '/' ) ) ;
596596 }
597597
598- function parsePathOutput ( pathname ) {
599- return parsePath ( pathname . replace ( '/' , hashRoot ) ) ;
598+ function parsePathOutput ( to ) {
599+ let path = typeof to === 'string' ? parsePath ( to ) : to
600+ let pathname = parsePath ( pathname . replace ( '/' , hashRoot ) ) ;
601+ return {
602+ ...path ,
603+ pathname
604+ }
600605 }
601606
602607 function getIndexAndLocation ( ) : [ number , Location ] {
@@ -708,7 +713,7 @@ export function createHashHistory(
708713 pathname : location . pathname ,
709714 hash : '' ,
710715 search : '' ,
711- ...( typeof to === 'string' ? parsePathOutput ( to ) : to ) ,
716+ ...parsePathOutput ( to ) ,
712717 state,
713718 key : createKey ( )
714719 } ) ;
You can’t perform that action at this time.
0 commit comments