File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ var $articleContainer,
4040 if ( noModifierKeys && sameHostname && sameProtocol ) {
4141 ev . preventDefault ( ) ;
4242 var href = this . href ;
43- window . history . pushState ( null , null , href ) ;
4443 navigate ( href ) ;
4544 }
4645 } ) ;
@@ -92,7 +91,6 @@ function init() {
9291 if ( ! searchControl ) {
9392 searchControl = new SearchControl ( ".search-bar" , {
9493 navigate : function ( href ) {
95- window . history . pushState ( null , null , href ) ;
9694 navigate ( href ) ;
9795 } ,
9896 pathPrefix : window . pathPrefix ,
@@ -242,8 +240,11 @@ function navigate(href) {
242240 if ( searchControl . searchResultsCache ) {
243241 searchControl . renderSearchResults ( searchControl . searchResultsCache ) ;
244242 }
243+
244+ window . history . pushState ( null , null , href ) ;
245245 } ,
246246 error : function ( ) {
247+ window . history . pushState ( null , null , href ) ;
247248 // just reload the page if this fails
248249 window . location . reload ( ) ;
249250 } ,
You can’t perform that action at this time.
0 commit comments