File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export class LocationLite implements Location {
7777 }
7878
7979 #goTo( url : string , replace : boolean , state : State | undefined ) {
80+ if ( url === '' ) {
81+ // Shallow routing.
82+ url = this . url . href ;
83+ }
8084 (
8185 replace ?
8286 globalThis . window ?. history . replaceState :
@@ -87,10 +91,6 @@ export class LocationLite implements Location {
8791 }
8892
8993 goTo ( url : string , options ?: GoToOptions ) : void {
90- if ( url === '' ) {
91- // Shallow routing.
92- url = this . url . href ;
93- }
9494 if ( options ?. preserveQuery ) {
9595 url = preserveQueryInUrl ( url , options . preserveQuery ) ;
9696 }
@@ -99,11 +99,7 @@ export class LocationLite implements Location {
9999
100100 navigate ( url : string , options ?: NavigateOptions ) : void {
101101 const resolvedHash = resolveHashValue ( options ?. hash ) ;
102- if ( url === '' ) {
103- // Shallow routing.
104- url = this . url . href ;
105- }
106- else {
102+ if ( url !== '' ) {
107103 url = calculateHref ( {
108104 ...options ,
109105 hash : resolvedHash ,
You can’t perform that action at this time.
0 commit comments