File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -468,8 +468,8 @@ class NavigationService {
468468
469469 setupEventListeners ( ) {
470470 window . addEventListener ( 'popstate' , async ( ) => {
471- const slug = new URLSearchParams ( window . location . search ) . toString ( )
472- . replace ( / ^ = / , '' ) . replace ( / ^ \? / , '' ) ;
471+ // Get slug without equal sign and question mark
472+ const slug = window . location . search . replace ( / ^ \? = ? / , '' ) . replace ( / ^ = / , '' ) ;
473473 const hash = window . location . hash ;
474474 this . eventBus . emit ( 'navigation:requested' , { slug, hash } ) ;
475475 } ) ;
@@ -479,7 +479,8 @@ class NavigationService {
479479 if ( target ) {
480480 e . preventDefault ( ) ;
481481 const slug = target . href . split ( '?' ) . pop ( ) ;
482- history . pushState ( { slug } , '' , target . href ) ;
482+ // Use clean URL format without equal sign
483+ history . pushState ( null , '' , `?${ slug } ` ) ;
483484 this . eventBus . emit ( 'navigation:requested' , { slug } ) ;
484485 }
485486 } ) ;
You can’t perform that action at this time.
0 commit comments